]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: amd-pmc: Fix compilation without CONFIG_SUSPEND
authorMario Limonciello <mario.limonciello@amd.com>
Sat, 2 Apr 2022 23:11:22 +0000 (18:11 -0500)
committerHans de Goede <hdegoede@redhat.com>
Mon, 4 Apr 2022 14:26:09 +0000 (16:26 +0200)
commita858b899bd6a47a5c7b6fde33f7d76c389bfe9ed
tree337cd389dd808b0f51a4fcc163d1641383d47d14
parente5aceca3c66d48e9b92e590d2c91a989060313c1
platform/x86: amd-pmc: Fix compilation without CONFIG_SUSPEND

Since commit 3a4508bfd015 ("platform/x86: amd-pmc: Move to later in the
suspend process") amd-pmc doesn't use traditional suspend resume
callback anymore but relies on functions only created declared when
CONFIG_SUSPEND is set.

Check for CONFIG_SUSPEND and only use those functions in those
circumstances.

Fixes: commit 3a4508bfd015 ("platform/x86: amd-pmc: Move to later in the suspend process")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20220402231122.3877-1-mario.limonciello@amd.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/amd-pmc.c