summaryrefslogtreecommitdiffstats
path: root/drivers/power/ds2760_battery.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-14 18:25:59 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-14 18:25:59 +0100
commit5957e33d6aec266659a71cfabcf7cf2c593ad0d2 (patch)
tree6397dec8d71e4ed4f5982792c57d7c0ddb525d1e /drivers/power/ds2760_battery.c
parentafs: add afs_wq and use it instead of the system workqueue (diff)
parentpower_supply: Add MAX17042 Fuel Gauge Driver (diff)
downloadlinux-5957e33d6aec266659a71cfabcf7cf2c593ad0d2.tar.xz
linux-5957e33d6aec266659a71cfabcf7cf2c593ad0d2.zip
Merge git://git.infradead.org/battery-2.6
* git://git.infradead.org/battery-2.6: (21 commits) power_supply: Add MAX17042 Fuel Gauge Driver olpc_battery: Fix up XO-1.5 properties list olpc_battery: Add support for CURRENT_NOW and VOLTAGE_NOW olpc_battery: Add support for CHARGE_NOW olpc_battery: Add support for CHARGE_FULL_DESIGN olpc_battery: Ambient temperature is not available on XO-1.5 jz4740-battery: Should include linux/io.h s3c_adc_battery: Add gpio_inverted field to pdata power_supply: Don't use flush_scheduled_work() power_supply: Fix use after free and memory leak gpio-charger: Fix potential race between irq handler and probe/remove gpio-charger: Provide default name for the power_supply gpio-charger: Check result of kzalloc jz4740-battery: Check if platform_data is supplied isp1704_charger: Detect charger after probe isp1704_charger: Set isp->dev before anything needs it isp1704_charger: Detect HUB/Host chargers isp1704_charger: Correct length for storing model power_supply: Add gpio charger driver jz4740-battery: Protect against concurrent battery readings ...
Diffstat (limited to 'drivers/power/ds2760_battery.c')
-rw-r--r--drivers/power/ds2760_battery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/ds2760_battery.c b/drivers/power/ds2760_battery.c
index e7f89785beef..e534290f3256 100644
--- a/drivers/power/ds2760_battery.c
+++ b/drivers/power/ds2760_battery.c
@@ -212,7 +212,7 @@ static int ds2760_battery_read_status(struct ds2760_device_info *di)
if (di->rem_capacity > 100)
di->rem_capacity = 100;
- if (di->current_uA >= 100L)
+ if (di->current_uA < -100L)
di->life_sec = -((di->accum_current_uAh - di->empty_uAh) * 36L)
/ (di->current_uA / 100L);
else