mfd: tc3589x: Guard PM methods with CONFIG_PM_SLEEP
PATCH 1/1 mfd: tc3589x: Guard PM methods with CONFIG_PM_SLEEP
Guard PM methods with CONFIG_PM_SLEEP and get rid of some unneeded #ifdefs. This fixes below build warnings:
CC drivers/mfd/tc3589x.odrivers/mfd/tc3589x.c:361:12: warning: 'tc3589x_suspend' defined but not used [-Wunused-function] drivers/mfd/tc3589x.c:375:12: warning: 'tc3589x_resume' defined but not used [-Wunused-function]
SIMPLE_DEV_PM_OPS already defines constant dev_pm_ops, thus also fix 'duplicate const' sparse warning.
--- drivers/mfd/tc3589x.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/mfd/tc3589x.c +3 -6
@@ -357,7 +357,7 @@ static int __devexit tc3589x_remove(struct i2c_client *client)return 0 ; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int tc3589x_suspend (struct device *dev) {struct tc3589x *tc3589x =dev_get_drvdata (dev);
@@ -385,11 +385,10 @@ static int tc3589x_resume(struct device *dev)return ret; } - -static const SIMPLE_DEV_PM_OPS(tc3589x_dev_pm_ops, tc3589x_suspend, - tc3589x_resume);#endif +static SIMPLE_DEV_PM_OPS(tc3589x_dev_pm_ops, tc3589x_suspend, tc3589x_resume); +static const struct i2c_device_id tc3589x_id[] = { {"tc3589x" ,24 }, { }
@@ -399,9 +398,7 @@ MODULE_DEVICE_TABLE(i2c, tc3589x_id);static struct i2c_driver tc3589x_driver = { .driver.name ="tc3589x" , .driver.owner =THIS_MODULE , -#ifdef CONFIG_PM .driver.pm = &tc3589x_dev_pm_ops, -#endif .probe = tc3589x_probe, .remove =__devexit_p (tc3589x_remove), .id_table = tc3589x_id,
Signature · 1 line
1.7.9.5
Samuel Ortiz
AppliedHi Axel,
Quoted 7 lines · Axel Lin
Guard PM methods with
CONFIG_PM_SLEEPand get rid of some unneeded #ifdefs. This fixes below build warnings:CC
drivers/mfd/tc3589x.odrivers/mfd/tc3589x.c:361:12: warning: 'tc3589x_suspend' defined but not used [-Wunused-function]drivers/mfd/tc3589x.c:375:12: warning: 'tc3589x_resume' defined but not used [-Wunused-function]
Quoted 7 lines
SIMPLE_DEV_PM_OPSalready defines constantdev_pm_ops, thus also fix 'duplicate const' sparse warning.Signed-off-by Axel Lin <[email protected]>--- drivers/mfd/tc3589x.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
Applied, thanks.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/