platform/x86: amd-pmc: only use callbacks for suspend
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 10 Dec 2021 14:35:29 +0000 (08:35 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Dec 2021 11:28:54 +0000 (12:28 +0100)
commita42c41be8324a34b37c1e8eb81c469cab85e1fc8
tree6416bccfb2e31dbd2598ceb9d97017bec879d220
parent9ede07c4af14a72f452f0cefc7efec7af76d04c8
platform/x86: amd-pmc: only use callbacks for suspend

commit 09fc14061f3ed28899c23b8714c066946fdbd43e upstream.

This driver is intended to be used exclusively for suspend to idle
so callbacks to send OS_HINT during hibernate and S5 will set OS_HINT
at the wrong time leading to an undefined behavior.

Cc: stable@vger.kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20211210143529.10594-1-mario.limonciello@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/amd-pmc.c