[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181220131413.21922-1-axel.lin@ingics.com>
Date: Thu, 20 Dec 2018 21:14:13 +0800
From: Axel Lin <axel.lin@...ics.com>
To: Mark Brown <broonie@...nel.org>
Cc: Andrei Stefanescu <andrei.stefanescu@...rochip.com>,
Liam Girdwood <lgirdwood@...il.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Axel Lin <axel.lin@...ics.com>
Subject: [PATCH] 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: Axel Lin <axel.lin@...ics.com>
---
This patch replaces below patch I sent today.
regulator: mcp16502: Fix build error when !CONFIG_SUSPEND && CONFIG_PM_SLEEP
Changed the subject line because after commit 308144ce8e51 ("regulator: mcp16502: code cleanup")
it's not related to build error now.
drivers/regulator/mcp16502.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c
index 809a664733a4..cb11fb206899 100644
--- a/drivers/regulator/mcp16502.c
+++ b/drivers/regulator/mcp16502.c
@@ -497,7 +497,7 @@ static int mcp16502_probe(struct i2c_client *client,
return 0;
}
-#ifdef CONFIG_SUSPEND
+#ifdef CONFIG_PM_SLEEP
static int mcp16502_suspend_noirq(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
@@ -517,10 +517,7 @@ static int mcp16502_resume_noirq(struct device *dev)
return 0;
}
-#else /* !CONFIG_SUSPEND */
-#define mcp16502_suspend_noirq NULL
-#define mcp16502_resume_noirq NULL
-#endif /* !CONFIG_SUSPEND */
+#endif
#ifdef CONFIG_PM
static const struct dev_pm_ops mcp16502_pm_ops = {
--
2.17.1
Powered by blists - more mailing lists