[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250522144422.2824083-1-arnd@kernel.org>
Date: Thu, 22 May 2025 16:38:49 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@....com>,
Hans de Goede <hdegoede@...hat.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Suma Hegde <suma.hegde@....com>
Cc: Arnd Bergmann <arnd@...db.de>,
Carlos Bilbao <carlos.bilbao@...nel.org>,
Yazen Ghannam <yazen.ghannam@....com>,
"Borislav Petkov (AMD)" <bp@...en8.de>,
platform-driver-x86@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] platform/x86/amd/hsmp: fix building with CONFIG_HWMON=m
From: Arnd Bergmann <arnd@...db.de>
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: 92c025db52bb ("platform/x86/amd/hsmp: Report power via hwmon sensors")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/platform/x86/amd/hsmp/Kconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/platform/x86/amd/hsmp/Kconfig b/drivers/platform/x86/amd/hsmp/Kconfig
index d6f7a62d55b5..2911120792e8 100644
--- a/drivers/platform/x86/amd/hsmp/Kconfig
+++ b/drivers/platform/x86/amd/hsmp/Kconfig
@@ -12,6 +12,7 @@ menu "AMD HSMP Driver"
config AMD_HSMP_ACPI
tristate "AMD HSMP ACPI device driver"
depends on ACPI
+ depends on HWMON || !HWMON
select AMD_HSMP
help
Host System Management Port (HSMP) interface is a mailbox interface
@@ -29,6 +30,7 @@ config AMD_HSMP_ACPI
config AMD_HSMP_PLAT
tristate "AMD HSMP platform device driver"
+ depends on HWMON || !HWMON
select AMD_HSMP
help
Host System Management Port (HSMP) interface is a mailbox interface
--
2.39.5
Powered by blists - more mailing lists