diff mbox series

[3/5] i2c: brcmstb: remove unnecessary CONFIG_PM_SLEEP

Message ID 20201029074654.227263-3-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
SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.

Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
---
 drivers/i2c/busses/i2c-brcmstb.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.
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-brcmstb.c b/drivers/i2c/busses/i2c-brcmstb.c
index d4e0a0f6732a..16f688e115be 100644
--- a/drivers/i2c/busses/i2c-brcmstb.c
+++ b/drivers/i2c/busses/i2c-brcmstb.c
@@ -713,7 +713,6 @@  static int brcmstb_i2c_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int brcmstb_i2c_suspend(struct device *dev)
 {
 	struct brcmstb_i2c_dev *i2c_dev = dev_get_drvdata(dev);
@@ -731,7 +730,6 @@  static int brcmstb_i2c_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(brcmstb_i2c_pm, brcmstb_i2c_suspend,
 			 brcmstb_i2c_resume);