summaryrefslogtreecommitdiffstats
path: root/drivers/power/ab8500_fg.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-10 11:13:00 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-10 11:13:00 -0700
commit7d3107d26b522a0fe92af6279256fa65fe3db771 (patch)
tree9c9fd7653737c6725752033421344579e2679aa4 /drivers/power/ab8500_fg.c
parent3aa78e0cb5c9b8b4ed2a617bb1e1542bfb508379 (diff)
parent5a6c2208455f25b3e6f939adc2da59aa00d4806e (diff)
Merge tag 'for-v3.11' of git://git.infradead.org/battery-2.6
Pull battery subsystem update from Anton Vorontsov: "Nothing exciting this time, just assorted fixes and cleanups" * tag 'for-v3.11' of git://git.infradead.org/battery-2.6: (25 commits) charger-manager: Fix regulator_get() return check charger-manager: Fix a bug when it unregisters notifier block of extcon tps65090-charger: Add dt node to power_supply sbs-battery: Add dt to power_supply struct power_supply: Add of_node_put to fix refcount power_supply: Move of_node out of the #ifdef CONFIG_OF power/reset: Make the vexpress driver optional on arm and arm64 charger-manager: Add missing newlines, fix a couple of typos, add pr_fmt tps65090-charger: Fix AC detect MAINTAINERS: Update email address for Anton Vorontsov charger-manager: Ensure event is not used as format string power_supply: Replace strict_strtoul() with kstrtoul() generic-adc-battery: Fix checking if none of the channels are supported power: Use platform_{get,set}_drvdata() pm2301_charger: Return error if create_singlethread_workqueue fails pm2301_charger: Fix NULL pointer dereference lp8727_charger: Support the device tree feature twl4030_charger: Remove unnecessary platform_set_drvdata() rx51_battery: Remove unnecessary platform_set_drvdata() jz4740-battery: Remove unnecessary platform_set_drvdata() ...
Diffstat (limited to 'drivers/power/ab8500_fg.c')
-rw-r--r--drivers/power/ab8500_fg.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
index c5391f5c372..754970717c3 100644
--- a/drivers/power/ab8500_fg.c
+++ b/drivers/power/ab8500_fg.c
@@ -2465,9 +2465,9 @@ static ssize_t charge_full_store(struct ab8500_fg *di, const char *buf,
size_t count)
{
unsigned long charge_full;
- ssize_t ret = -EINVAL;
+ ssize_t ret;
- ret = strict_strtoul(buf, 10, &charge_full);
+ ret = kstrtoul(buf, 10, &charge_full);
dev_dbg(di->dev, "Ret %zd charge_full %lu", ret, charge_full);
@@ -2489,7 +2489,7 @@ static ssize_t charge_now_store(struct ab8500_fg *di, const char *buf,
unsigned long charge_now;
ssize_t ret;
- ret = strict_strtoul(buf, 10, &charge_now);
+ ret = kstrtoul(buf, 10, &charge_now);
dev_dbg(di->dev, "Ret %zd charge_now %lu was %d",
ret, charge_now, di->bat_cap.prev_mah);
@@ -3070,7 +3070,6 @@ static int ab8500_fg_remove(struct platform_device *pdev)
flush_scheduled_work();
ab8500_fg_sysfs_psy_remove_attrs(di->fg_psy.dev);
power_supply_unregister(&di->fg_psy);
- platform_set_drvdata(pdev, NULL);
return ret;
}