Skip to contentSkip to conversation

hwmon: (tmp513) Add missing dependency on REGMAP_I2C

PATCH In review Guenter Roeck 2 participants 2 messages Oct 1, 2024 Hardware monitoring

lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 1/1 hwmon: (tmp513) Add missing dependency on REGMAP_I2C

0-day reports:

drivers/hwmon/tmp513.c:162:21: error:
variable 'tmp51x_regmap_config' has initializer but incomplete type
162 | static const struct regmap_config tmp51x_regmap_config = {
| ^

struct regmap_config is only available if REGMAP is enabled. Add the missing Kconfig dependency to fix the problem.

Fixes 59dfa75e5d82 ("hwmon: Add driver for Texas Instruments TMP512/513 sensor chips.")
Cc Eric Tremblay <[email protected]>
---
 drivers/hwmon/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hwmon/Kconfig +1 -0
index 65ea92529406..68f585fc67c5 100644
@@ -2312,6 +2312,7 @@ config SENSORS_TMP464
 config SENSORS_TMP513
 	tristate "Texas Instruments TMP513 and compatibles"
 	depends on I2C
+	select REGMAP_I2C
 	help
 	  If you say yes here you get support for Texas Instruments TMP512,
 	  and TMP513 temperature and power supply sensor chips.
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 24 lines · Guenter Roeck

0-day reports:

drivers/hwmon/tmp513.c:162:21: error:
variable 'tmp51x_regmap_config' has initializer but incomplete type
162 | static const struct regmap_config tmp51x_regmap_config = {
| ^

struct regmap_config is only available if REGMAP is enabled. Add the missing Kconfig dependency to fix the problem.

Fixes 59dfa75e5d82 ("hwmon: Add driver for Texas Instruments TMP512/513 sensor chips.")
Cc Eric Tremblay <[email protected]>
---
 drivers/hwmon/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hwmon/Kconfig +0 -0
index 65ea92529406..68f585fc67c5 100644

drivers/hwmon/Kconfig config SENSORS_TMP464 · line 2318

Quoted 7 lines
drivers/hwmon/Kconfig +1 -0
@@ -2312,6 +2312,7 @@ config SENSORS_TMP464
 config SENSORS_TMP513
 	tristate "Texas Instruments TMP513 and compatibles"
 	depends on I2C
+	select REGMAP_I2C
 	help
 	  If you say yes here you get support for Texas Instruments TMP512,
 	  and TMP513 temperature and power supply sensor chips.