aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/power/ds2782_battery.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c
index 041f9b638d28..39694883d3bf 100644
--- a/drivers/power/ds2782_battery.c
+++ b/drivers/power/ds2782_battery.c
@@ -351,13 +351,9 @@ static int ds278x_resume(struct device *dev)
351 schedule_delayed_work(&info->bat_work, DS278x_DELAY); 351 schedule_delayed_work(&info->bat_work, DS278x_DELAY);
352 return 0; 352 return 0;
353} 353}
354#endif /* CONFIG_PM_SLEEP */
354 355
355static SIMPLE_DEV_PM_OPS(ds278x_battery_pm_ops, ds278x_suspend, ds278x_resume); 356static SIMPLE_DEV_PM_OPS(ds278x_battery_pm_ops, ds278x_suspend, ds278x_resume);
356#define DS278X_BATTERY_PM_OPS (&ds278x_battery_pm_ops)
357
358#else
359#define DS278X_BATTERY_PM_OPS NULL
360#endif /* CONFIG_PM_SLEEP */
361 357
362enum ds278x_num_id { 358enum ds278x_num_id {
363 DS2782 = 0, 359 DS2782 = 0,
@@ -460,7 +456,7 @@ MODULE_DEVICE_TABLE(i2c, ds278x_id);
460static struct i2c_driver ds278x_battery_driver = { 456static struct i2c_driver ds278x_battery_driver = {
461 .driver = { 457 .driver = {
462 .name = "ds2782-battery", 458 .name = "ds2782-battery",
463 .pm = DS278X_BATTERY_PM_OPS, 459 .pm = &ds278x_battery_pm_ops,
464 }, 460 },
465 .probe = ds278x_battery_probe, 461 .probe = ds278x_battery_probe,
466 .remove = ds278x_battery_remove, 462 .remove = ds278x_battery_remove,