summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/Kconfig
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2024-05-07 16:01:50 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2024-05-07 16:05:30 +0200
commitbc8744c6bf0d487dcb7911d093fce60a62cc2654 (patch)
tree5fa257f4243b88510f57e5069e1f4d1c8667e912 /drivers/macintosh/Kconfig
parentpowerpc/Makefile: Remove bits related to the previous use of -mcmodel=large (diff)
downloadlinux-bc8744c6bf0d487dcb7911d093fce60a62cc2654.tar.xz
linux-bc8744c6bf0d487dcb7911d093fce60a62cc2654.zip
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 <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240507140150.54630-1-mpe@ellerman.id.au
Diffstat (limited to 'drivers/macintosh/Kconfig')
-rw-r--r--drivers/macintosh/Kconfig2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig
index a0e717a986dc..fb38f684444f 100644
--- a/drivers/macintosh/Kconfig
+++ b/drivers/macintosh/Kconfig
@@ -262,7 +262,7 @@ config SENSORS_AMS
will be called ams.
config SENSORS_AMS_PMU
- bool "PMU variant"
+ bool "PMU variant" if SENSORS_AMS_I2C
depends on SENSORS_AMS && ADB_PMU
default y
help