Message ID | 20201029074654.227263-3-coiby.xu@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [1/5] i2c: qup: remove unnecessary CONFIG_PM_SLEEP | expand |
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 --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);
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(-)