summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-01-13 06:13:06 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2010-01-13 06:13:06 +0100
commit53ff7095cce683813be075379160b8e4e6ea8b85 (patch)
tree723754032e6eb42af3f555946b9786900a8f659c
parent[SCSI] megaraid_sas: remove sysfs poll_mode_io world writeable permissions (diff)
parentpmu_battery: Fix battery full reporting (diff)
downloadlinux-53ff7095cce683813be075379160b8e4e6ea8b85.tar.xz
linux-53ff7095cce683813be075379160b8e4e6ea8b85.zip
Merge git://git.infradead.org/battery-2.6
* git://git.infradead.org/battery-2.6: pmu_battery: Fix battery full reporting
-rw-r--r--drivers/power/pmu_battery.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/power/pmu_battery.c b/drivers/power/pmu_battery.c
index 9346a862f1f2..9c87ad564803 100644
--- a/drivers/power/pmu_battery.c
+++ b/drivers/power/pmu_battery.c
@@ -89,6 +89,8 @@ static int pmu_bat_get_property(struct power_supply *psy,
case POWER_SUPPLY_PROP_STATUS:
if (pbi->flags & PMU_BATT_CHARGING)
val->intval = POWER_SUPPLY_STATUS_CHARGING;
+ else if (pmu_power_flags & PMU_PWR_AC_PRESENT)
+ val->intval = POWER_SUPPLY_STATUS_FULL;
else
val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
break;