diff mbox series

[1/5] i2c: qup: remove unnecessary CONFIG_PM_SLEEP

Message ID 20201029074654.227263-1-coiby.xu@gmail.com
State New
Headers show
Series [1/5] i2c: qup: remove unnecessary CONFIG_PM_SLEEP | expand

Commit Message

Coiby Xu Oct. 29, 2020, 7:46 a.m. UTC
SET_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.

Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
---
 drivers/i2c/busses/i2c-qup.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Florian Fainelli Nov. 4, 2020, 3:28 a.m. UTC | #1
On 10/29/2020 12:46 AM, Coiby Xu wrote:
> SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.

> 

> Signed-off-by: Coiby Xu <coiby.xu@gmail.com>


You need to annotate brcmstb_i2c_suspend and brcmstb_i2c_resume with
__maybe_unused to avoid generating compiler warnings about unused
functions with CONFIG_PM_SLEEP disabled.
-- 
Florian
Linus Walleij Nov. 5, 2020, 2:03 p.m. UTC | #2
On Thu, Oct 29, 2020 at 8:47 AM Coiby Xu <coiby.xu@gmail.com> wrote:

> SET_LATE_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.
>
> Signed-off-by: Coiby Xu <coiby.xu@gmail.com>

I don't know about the state of sleep/pm callback macros, but I
assume you know what you're doing.
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index fbc04b60cfd1..bf63e4567705 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -1940,7 +1940,6 @@  static int qup_i2c_pm_resume_runtime(struct device *device)
 }
 #endif
 
-#ifdef CONFIG_PM_SLEEP
 static int qup_i2c_suspend(struct device *device)
 {
 	if (!pm_runtime_suspended(device))
@@ -1955,7 +1954,6 @@  static int qup_i2c_resume(struct device *device)
 	pm_request_autosuspend(device);
 	return 0;
 }
-#endif
 
 static const struct dev_pm_ops qup_i2c_qup_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(