aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-07-02 05:19:52 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-07-08 18:16:13 -0400
commit930bf02299943c67a52919a23a3eaf5ee9abbbe1 (patch)
tree45d01bfdcc45d57c9fe6e1e274f573d58a428568
parent938848e7a5550ce28036ab30e2900b4672a540ee (diff)
mfd: Guard tc3589x 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.o drivers/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. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r--drivers/mfd/tc3589x.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c
index de979742c6fc..048bf0532a09 100644
--- a/drivers/mfd/tc3589x.c
+++ b/drivers/mfd/tc3589x.c
@@ -357,7 +357,7 @@ static int __devexit tc3589x_remove(struct i2c_client *client)
357 return 0; 357 return 0;
358} 358}
359 359
360#ifdef CONFIG_PM 360#ifdef CONFIG_PM_SLEEP
361static int tc3589x_suspend(struct device *dev) 361static int tc3589x_suspend(struct device *dev)
362{ 362{
363 struct tc3589x *tc3589x = dev_get_drvdata(dev); 363 struct tc3589x *tc3589x = dev_get_drvdata(dev);
@@ -385,11 +385,10 @@ static int tc3589x_resume(struct device *dev)
385 385
386 return ret; 386 return ret;
387} 387}
388
389static const SIMPLE_DEV_PM_OPS(tc3589x_dev_pm_ops, tc3589x_suspend,
390 tc3589x_resume);
391#endif 388#endif
392 389
390static SIMPLE_DEV_PM_OPS(tc3589x_dev_pm_ops, tc3589x_suspend, tc3589x_resume);
391
393static const struct i2c_device_id tc3589x_id[] = { 392static const struct i2c_device_id tc3589x_id[] = {
394 { "tc3589x", 24 }, 393 { "tc3589x", 24 },
395 { } 394 { }
@@ -399,9 +398,7 @@ MODULE_DEVICE_TABLE(i2c, tc3589x_id);
399static struct i2c_driver tc3589x_driver = { 398static struct i2c_driver tc3589x_driver = {
400 .driver.name = "tc3589x", 399 .driver.name = "tc3589x",
401 .driver.owner = THIS_MODULE, 400 .driver.owner = THIS_MODULE,
402#ifdef CONFIG_PM
403 .driver.pm = &tc3589x_dev_pm_ops, 401 .driver.pm = &tc3589x_dev_pm_ops,
404#endif
405 .probe = tc3589x_probe, 402 .probe = tc3589x_probe,
406 .remove = __devexit_p(tc3589x_remove), 403 .remove = __devexit_p(tc3589x_remove),
407 .id_table = tc3589x_id, 404 .id_table = tc3589x_id,