Skip to content

Commit 69157b0

Browse files
arndbij-intel
authored andcommitted
platform/x86/amd/hsmp: fix building with CONFIG_HWMON=m
When CONFIG_HWMON is built as a loadable module, the HSMP drivers cannot be built-in: ERROR: modpost: "hsmp_create_sensor" [drivers/platform/x86/amd/hsmp/amd_hsmp.ko] undefined! ERROR: modpost: "hsmp_create_sensor" [drivers/platform/x86/amd/hsmp/hsmp_acpi.ko] undefined! Enforce that through the usual Kconfig dependnecy trick. Fixes: 92c025d ("platform/x86/amd/hsmp: Report power via hwmon sensors") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20250522144422.2824083-1-arnd@kernel.org Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent 7ff5f09 commit 69157b0

File tree

1 file changed

+2
-0
lines changed
  • drivers/platform/x86/amd/hsmp

1 file changed

+2
-0
lines changed

drivers/platform/x86/amd/hsmp/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ menu "AMD HSMP Driver"
1212
config AMD_HSMP_ACPI
1313
tristate "AMD HSMP ACPI device driver"
1414
depends on ACPI
15+
depends on HWMON || !HWMON
1516
select AMD_HSMP
1617
help
1718
Host System Management Port (HSMP) interface is a mailbox interface
@@ -29,6 +30,7 @@ config AMD_HSMP_ACPI
2930

3031
config AMD_HSMP_PLAT
3132
tristate "AMD HSMP platform device driver"
33+
depends on HWMON || !HWMON
3234
select AMD_HSMP
3335
help
3436
Host System Management Port (HSMP) interface is a mailbox interface

0 commit comments

Comments
 (0)