summaryrefslogtreecommitdiff
path: root/drivers/power/power_supply_core.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-25 21:00:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-25 21:00:29 -0700
commit56a9ccb7ba5ffd5f285e3a9628cb446192c8639c (patch)
treea9d54537cea4761073374ef5fbc9097cbfe52440 /drivers/power/power_supply_core.c
parent44bbd7ac2658eb1118342493026ef141e259b739 (diff)
parent909a78b320b31ca9709d7ea5f602ec1bd2015192 (diff)
Merge git://git.infradead.org/battery-2.6
* git://git.infradead.org/battery-2.6: (30 commits) bq20z75: Fix time and temp units bq20z75: Fix issues with present and suspend z2_battery: Fix count of properties s3c_adc_battery: Fix method names when PM not set z2_battery: Add MODULE_DEVICE_TABLE ds2782_battery: Add MODULE_DEVICE_TABLE bq20z75: Add MODULE_DEVICE_TABLE power_supply: Update power_supply_is_watt_property bq20z75: Add i2c retry mechanism bq20z75: Add optional battery detect gpio twl4030_charger: Make the driver atomic notifier safe bq27x00: Use single i2c_transfer call for property read bq27x00: Cleanup bq27x00_i2c_read bq27x00: Minor cleanups bq27x00: Give more specific reports on battery status bq27x00: Add MODULE_DEVICE_TABLE bq27x00: Add new properties bq27x00: Poll battery state bq27x00: Cache battery registers bq27x00: Add bq27000 support ...
Diffstat (limited to 'drivers/power/power_supply_core.c')
-rw-r--r--drivers/power/power_supply_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
index 970f7335d3a7..329b46b2327d 100644
--- a/drivers/power/power_supply_core.c
+++ b/drivers/power/power_supply_core.c
@@ -171,6 +171,8 @@ int power_supply_register(struct device *parent, struct power_supply *psy)
dev_set_drvdata(dev, psy);
psy->dev = dev;
+ INIT_WORK(&psy->changed_work, power_supply_changed_work);
+
rc = kobject_set_name(&dev->kobj, "%s", psy->name);
if (rc)
goto kobject_set_name_failed;
@@ -179,8 +181,6 @@ int power_supply_register(struct device *parent, struct power_supply *psy)
if (rc)
goto device_add_failed;
- INIT_WORK(&psy->changed_work, power_supply_changed_work);
-
rc = power_supply_create_triggers(psy);
if (rc)
goto create_triggers_failed;