hwmon: tmp108: fix I3C dependency
authorArnd Bergmann <arnd@arndb.de>
Wed, 13 Nov 2024 17:55:33 +0000 (18:55 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 13 Nov 2024 20:03:54 +0000 (12:03 -0800)
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Message-ID: <20241113175615.2442851-1-arnd@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/Kconfig

index ad20dc8506f99db6541d887538d6dbe8851db887..6b497dd875626a8a392fef212b59028940d282c7 100644 (file)
@@ -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