macintosh/ams: Fix unused variable warning
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 7 May 2024 14:01:50 +0000 (00:01 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 7 May 2024 14:05:30 +0000 (00:05 +1000)
commitbc8744c6bf0d487dcb7911d093fce60a62cc2654
tree5fa257f4243b88510f57e5069e1f4d1c8667e912
parentc330b50d8cae1a7b1fed7622eedacaf652396bb7
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
drivers/macintosh/Kconfig