Commit a8e896e2 authored by Len Brown's avatar Len Brown

Merge branch 'battery' into release

parents 39cecf20 50b17851
...@@ -471,7 +471,7 @@ static void sysfs_remove_battery(struct acpi_battery *battery) ...@@ -471,7 +471,7 @@ static void sysfs_remove_battery(struct acpi_battery *battery)
static int acpi_battery_update(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); result = acpi_battery_get_status(battery);
if (result) if (result)
return result; return result;
...@@ -482,7 +482,8 @@ static int acpi_battery_update(struct acpi_battery *battery) ...@@ -482,7 +482,8 @@ static int acpi_battery_update(struct acpi_battery *battery)
return 0; return 0;
} }
#endif #endif
if (!battery->update_time) { if (!battery->update_time ||
old_present != acpi_battery_present(battery)) {
result = acpi_battery_get_info(battery); result = acpi_battery_get_info(battery);
if (result) if (result)
return result; return result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment