rtc: ds3232: avoid unused-const-variable warning
authorAkinobu Mita <akinobu.mita@gmail.com>
Sat, 18 Nov 2023 09:22:00 +0000 (18:22 +0900)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 8 Jan 2024 00:15:49 +0000 (01:15 +0100)
commit3628d999e31e2e31b51f78b0f68e91275854c179
tree584151f1d40e706f99c05725cd43287fbcfc4637
parentcd0d7d6639de4468d181c87e45cfd07d51b525da
rtc: ds3232: avoid unused-const-variable warning

Fix the following warning when CONFIG_I2C is not set but CONFIG_SPI_MASTER
is set.

warning: 'ds3232_pm_ops' defined but not used [-Wunused-const-variable=]

'ds3232_pm_ops' is only used by rtc-ds3232 i2c driver, so move the device
PM callbacks inside #if IS_ENABLED(CONFIG_I2C).

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311172325.33tTniaJ-lkp@intel.com/
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Link: https://lore.kernel.org/r/20231118092200.829808-1-akinobu.mita@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-ds3232.c