diff options
author | Len Brown <len.brown@intel.com> | 2009-01-09 09:36:59 +0100 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-01-09 09:36:59 +0100 |
commit | a8e896e2813316a2d3657dc07d5eef83c3b2d9f4 (patch) | |
tree | b1151588bb4b355fe6956348435f2adb409aa3f2 /drivers | |
parent | Merge branch 'asus-eeepc' into release (diff) | |
parent | Newly inserted battery might differ from one just removed, so (diff) | |
download | linux-a8e896e2813316a2d3657dc07d5eef83c3b2d9f4.tar.xz linux-a8e896e2813316a2d3657dc07d5eef83c3b2d9f4.zip |
Merge branch 'battery' into release
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/battery.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 1423b0c0cd2e..65132f920459 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -471,7 +471,7 @@ static void sysfs_remove_battery(struct acpi_battery *battery) static int acpi_battery_update(struct acpi_battery *battery) { - int result; + int result, old_present = acpi_battery_present(battery); result = acpi_battery_get_status(battery); if (result) return result; @@ -482,7 +482,8 @@ static int acpi_battery_update(struct acpi_battery *battery) return 0; } #endif - if (!battery->update_time) { + if (!battery->update_time || + old_present != acpi_battery_present(battery)) { result = acpi_battery_get_info(battery); if (result) return result; |