platform/x86: amd-pmc: Fix compilation when CONFIG_DEBUGFS is disabled
authorHans de Goede <hdegoede@redhat.com>
Tue, 28 Sep 2021 14:16:06 +0000 (16:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:57:05 +0000 (12:57 +0100)
commit2dcf115681d4280fe4612b768ce7c99fd4d73af8
treeb38d446a2852d97aa88e8a5958a2a87f67ebb7b5
parent32e3a6c4a756bf503e3b668adc71fee588bf1bd4
platform/x86: amd-pmc: Fix compilation when CONFIG_DEBUGFS is disabled

commit 40635cd32f0d83573a558dc30e9ba3469e769249 upstream.

The amd_pmc_get_smu_version() and amd_pmc_idlemask_read() functions are
used in the probe / suspend/resume code, so they are also used when
CONFIG_DEBUGFS is disabled, move them outside of the #ifdef CONFIG_DEBUGFS
block.

Note this purely moves the code to above the #ifdef CONFIG_DEBUGFS,
the code is completely unchanged.

Fixes: f6045de1f532 ("platform/x86: amd-pmc: Export Idlemask values based on the APU")
Cc: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Cc: Sanket Goswami <Sanket.Goswami@amd.com>
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/amd-pmc.c