From: Robin Gong Date: Tue, 23 Jul 2019 15:56:14 +0000 (+0800) Subject: MLK-22302-5: regulator: pfuze100: fix build warning with CONFIG_PM_SLEEP=n X-Git-Tag: rel_imx_4.19.35_1.1.0~205 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=bd1ac9cf594ac623bbe60014792b4f2da330bd9f;p=linux.git MLK-22302-5: regulator: pfuze100: fix build warning with CONFIG_PM_SLEEP=n Fix build waring with CONFIG_PM_SLEEP=n. Signed-off-by: Robin Gong Reviewed-by: Andy Duan (cherry picked from commit 9967e06ba509ba84fec4b3848341c58d1c4d740a) --- diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c index 21e6d4bec7c1..6edc12ff4a8e 100644 --- a/drivers/regulator/pfuze100-regulator.c +++ b/drivers/regulator/pfuze100-regulator.c @@ -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)