diff options
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/ds2760_battery.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/power/ds2760_battery.c b/drivers/power/ds2760_battery.c index 520b5c49ff30..cf07c43e90cd 100644 --- a/drivers/power/ds2760_battery.c +++ b/drivers/power/ds2760_battery.c | |||
@@ -381,12 +381,6 @@ static int ds2760_battery_probe(struct platform_device *pdev) | |||
381 | 381 | ||
382 | di->charge_status = POWER_SUPPLY_STATUS_UNKNOWN; | 382 | di->charge_status = POWER_SUPPLY_STATUS_UNKNOWN; |
383 | 383 | ||
384 | retval = power_supply_register(&pdev->dev, &di->bat); | ||
385 | if (retval) { | ||
386 | dev_err(di->dev, "failed to register battery\n"); | ||
387 | goto batt_failed; | ||
388 | } | ||
389 | |||
390 | /* enable sleep mode feature */ | 384 | /* enable sleep mode feature */ |
391 | ds2760_battery_read_status(di); | 385 | ds2760_battery_read_status(di); |
392 | status = di->raw[DS2760_STATUS_REG]; | 386 | status = di->raw[DS2760_STATUS_REG]; |
@@ -397,6 +391,12 @@ static int ds2760_battery_probe(struct platform_device *pdev) | |||
397 | 391 | ||
398 | ds2760_battery_write_status(di, status); | 392 | ds2760_battery_write_status(di, status); |
399 | 393 | ||
394 | retval = power_supply_register(&pdev->dev, &di->bat); | ||
395 | if (retval) { | ||
396 | dev_err(di->dev, "failed to register battery\n"); | ||
397 | goto batt_failed; | ||
398 | } | ||
399 | |||
400 | INIT_DELAYED_WORK(&di->monitor_work, ds2760_battery_work); | 400 | INIT_DELAYED_WORK(&di->monitor_work, ds2760_battery_work); |
401 | di->monitor_wqueue = create_singlethread_workqueue(dev_name(&pdev->dev)); | 401 | di->monitor_wqueue = create_singlethread_workqueue(dev_name(&pdev->dev)); |
402 | if (!di->monitor_wqueue) { | 402 | if (!di->monitor_wqueue) { |