i2c: at91: mark PM ops as __maybe unused
authorWolfram Sang <wsa@kernel.org>
Wed, 11 Aug 2021 13:10:02 +0000 (15:10 +0200)
committerWolfram Sang <wsa@kernel.org>
Wed, 11 Aug 2021 13:54:01 +0000 (15:54 +0200)
The driver uses pm_ptr(), so the PM ops could be unused.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: dab4b0e8c9a5 ("i2c: at91: remove #define CONFIG_PM")
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-at91-core.c

index 9f3c3e8e8011cedc97e30a08196d389272b1b2b1..2df9df585131494f9f014ab96e3776246e2c9ccc 100644 (file)
@@ -333,7 +333,7 @@ static int __maybe_unused at91_twi_resume_noirq(struct device *dev)
        return 0;
 }
 
-static const struct dev_pm_ops at91_twi_pm = {
+static const struct dev_pm_ops __maybe_unused at91_twi_pm = {
        .suspend_noirq  = at91_twi_suspend_noirq,
        .resume_noirq   = at91_twi_resume_noirq,
        .runtime_suspend        = at91_twi_runtime_suspend,