MLK-21076-4 regulator: pfuze100: Fix build warning when CONFIG_PM_SLEEP=n
authorAnson Huang <Anson.Huang@nxp.com>
Tue, 23 Jul 2019 01:43:25 +0000 (09:43 +0800)
committerAnson Huang <Anson.Huang@nxp.com>
Tue, 23 Jul 2019 07:53:13 +0000 (15:53 +0800)
Fix below build warning when CONFIG_PM_SLEEP=n:

drivers/regulator/pfuze100-regulator.c:743:12: warning:
 'pfuze_resume' defined but not used [-Wunused-function]
 static int pfuze_resume(struct device *dev)
            ^~~~~~~~~~~~
drivers/regulator/pfuze100-regulator.c:717:12: warning:
 'pfuze_suspend' defined but not used [-Wunused-functio ]
 static int pfuze_suspend(struct device *dev)
            ^~~~~~~~~~~~~

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit 36fb6ba8ad9f3a5eb6d883e53c5bb42cd5aec3ce)

drivers/regulator/pfuze100-regulator.c

index 5146d51..21e6d4b 100644 (file)
@@ -798,7 +798,7 @@ static int pfuze_reg_save_restore(struct pfuze_chip *pfuze_chip, int start,
        return index + i;
 }
 
-static int pfuze_suspend(struct device *dev)
+static int __maybe_unused pfuze_suspend(struct device *dev)
 {
        struct pfuze_chip *pfuze_chip = i2c_get_clientdata(to_i2c_client(dev));
        int index = 0;
@@ -824,7 +824,7 @@ err_ret:
        return index;
 }
 
-static int pfuze_resume(struct device *dev)
+static int __maybe_unused pfuze_resume(struct device *dev)
 {
        struct pfuze_chip *pfuze_chip = i2c_get_clientdata(to_i2c_client(dev));
        int index = 0;