Skip to contentSkip to conversation

hwmon: tmp108: fix I3C dependency

PATCH In review Arnd Bergmann 2 participants 2 messages Nov 13, 2024 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: tmp108: fix I3C dependency

From: Arnd Bergmann <[email protected]>

It's possible to build a kernel with tmp108 built-in but i3c support in a loadable module, but that results in a link failure:

x86_64-linux-ld: drivers/hwmon/tmp108.o: in function `p3t1085_i3c_probe':
tmp108.c:(.text+0x5f9): undefined reference to `i3cdev_to_dev'

Add a Kconfig dependency to ensure only the working configurations are allowed.

Fixes c40655e33106 ("hwmon: (tmp108) Add support for I3C device")
---
 drivers/hwmon/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hwmon/Kconfig +1 -0
index f15e72b319af..dd376602f3f1 100644
@@ -2297,6 +2297,7 @@ config SENSORS_TMP103
 config SENSORS_TMP108
 	tristate "Texas Instruments TMP108"
 	depends on I2C
+	depends on I3C || !I3C
 	select REGMAP_I2C
 	select REGMAP_I3C if I3C
 	help
Signature · 1 line
2.39.5
maintainer
#1 lore raw
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

It's possible to build a kernel with tmp108 built-in but i3c support in a loadable module, but that results in a link failure:

Quoted 8 lines

x86_64-linux-ld: drivers/hwmon/tmp108.o: in function `p3t1085_i3c_probe':
tmp108.c:(.text+0x5f9): undefined reference to `i3cdev_to_dev'

Add a Kconfig dependency to ensure only the working configurations are allowed.

Fixes c40655e33106 ("hwmon: (tmp108) Add support for I3C device")

I knew I missed something ;-).

Thanks a lot for the patch. Applied.

Guenter