Skip to content

Commit bc8744c

Browse files
committed
macintosh/ams: Fix unused variable warning
If both CONFIG_SENSORS_AMS_PMU and CONFIG_SENSORS_AMS_I2C are unset, there is an unused variable warning in the ams driver: drivers/macintosh/ams/ams-core.c: In function 'ams_init': drivers/macintosh/ams/ams-core.c:181:29: warning: unused variable 'np' 181 | struct device_node *np; The driver needs at least one of the configs enabled in order to actually function. So fix the compiler warning by ensuring at least one of the configs is enabled. Suggested-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
1 parent c330b50 commit bc8744c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/macintosh/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ config SENSORS_AMS
262262
will be called ams.
263263

264264
config SENSORS_AMS_PMU
265-
bool "PMU variant"
265+
bool "PMU variant" if SENSORS_AMS_I2C
266266
depends on SENSORS_AMS && ADB_PMU
267267
default y
268268
help

0 commit comments

Comments
 (0)