MLK-22302-5: regulator: pfuze100: fix build warning with CONFIG_PM_SLEEP=n
authorRobin Gong <yibin.gong@nxp.com>
Tue, 23 Jul 2019 15:56:14 +0000 (23:56 +0800)
committerRobin Gong <yibin.gong@nxp.com>
Tue, 23 Jul 2019 16:50:48 +0000 (00:50 +0800)
Fix build waring with CONFIG_PM_SLEEP=n.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
(cherry picked from commit 9967e06ba509ba84fec4b3848341c58d1c4d740a)

drivers/regulator/pfuze100-regulator.c

index 21e6d4b..6edc12f 100644 (file)
@@ -778,6 +778,7 @@ static int pfuze100_regulator_probe(struct i2c_client *client,
        return 0;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int pfuze_reg_save_restore(struct pfuze_chip *pfuze_chip, int start,
                                  int end, int index, bool save)
 {
@@ -849,6 +850,7 @@ static int __maybe_unused pfuze_resume(struct device *dev)
 err_ret:
        return index;
 }
+#endif
 
 static const struct dev_pm_ops pfuze_pm_ops = {
        SET_SYSTEM_SLEEP_PM_OPS(pfuze_suspend, pfuze_resume)