Commit 4906d091 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: mcp16502: Use #ifdef CONFIG_PM_SLEEP around mcp16502_suspend/resume_noirq

mcp16502_suspend/resume_noirq is only used by SET_NOIRQ_SYSTEM_SLEEP_PM_OPS
when CONFIG_PM_SLEEP is defined.
So use #ifdef CONFIG_PM_SLEEP instead CONFIG_SUSPEND guard.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 308144ce
...@@ -497,7 +497,7 @@ static int mcp16502_probe(struct i2c_client *client, ...@@ -497,7 +497,7 @@ static int mcp16502_probe(struct i2c_client *client,
return 0; return 0;
} }
#ifdef CONFIG_SUSPEND #ifdef CONFIG_PM_SLEEP
static int mcp16502_suspend_noirq(struct device *dev) static int mcp16502_suspend_noirq(struct device *dev)
{ {
struct i2c_client *client = to_i2c_client(dev); struct i2c_client *client = to_i2c_client(dev);
...@@ -517,10 +517,7 @@ static int mcp16502_resume_noirq(struct device *dev) ...@@ -517,10 +517,7 @@ static int mcp16502_resume_noirq(struct device *dev)
return 0; return 0;
} }
#else /* !CONFIG_SUSPEND */ #endif
#define mcp16502_suspend_noirq NULL
#define mcp16502_resume_noirq NULL
#endif /* !CONFIG_SUSPEND */
#ifdef CONFIG_PM #ifdef CONFIG_PM
static const struct dev_pm_ops mcp16502_pm_ops = { static const struct dev_pm_ops mcp16502_pm_ops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment