Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

platform/x86/amd/pmf: Fix undefined reference to platform_profile

Its reported that amd-pmf driver when built with config which does not
have ACPI_PLATFORM_PROFILE set/enabled throws a undefined references to
symbols used.

ld: vmlinux.o: in function `amd_pmf_init_sps':
drivers/platform/x86/amd/pmf/sps.c:132: undefined reference to `platform_profile_register'
ld: vmlinux.o: in function `amd_pmf_deinit_sps':
drivers/platform/x86/amd/pmf/sps.c:142: undefined reference to `platform_profile_remove'

Fix it by adding a "select" to the Kconfig.

Fixes: da5ce22df5fe ("platform/x86/amd/pmf: Add support for PMF core layer")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Link: https://lore.kernel.org/r/20220819083858.3987590-1-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Shyam Sundar S K and committed by
Hans de Goede
c2f7edf8 d82f5111

+1
+1
drivers/platform/x86/amd/pmf/Kconfig
··· 6 6 config AMD_PMF 7 7 tristate "AMD Platform Management Framework" 8 8 depends on ACPI && PCI 9 + select ACPI_PLATFORM_PROFILE 9 10 help 10 11 This driver provides support for the AMD Platform Management Framework. 11 12 The goal is to enhance end user experience by making AMD PCs smarter,