diff options
| -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) | |||
| 471 | 471 | ||
| 472 | static int acpi_battery_update(struct acpi_battery *battery) | 472 | static int acpi_battery_update(struct acpi_battery *battery) |
| 473 | { | 473 | { |
| 474 | int result; | 474 | int result, old_present = acpi_battery_present(battery); |
| 475 | result = acpi_battery_get_status(battery); | 475 | result = acpi_battery_get_status(battery); |
| 476 | if (result) | 476 | if (result) |
| 477 | return result; | 477 | return result; |
| @@ -482,7 +482,8 @@ static int acpi_battery_update(struct acpi_battery *battery) | |||
| 482 | return 0; | 482 | return 0; |
| 483 | } | 483 | } |
| 484 | #endif | 484 | #endif |
| 485 | if (!battery->update_time) { | 485 | if (!battery->update_time || |
| 486 | old_present != acpi_battery_present(battery)) { | ||
| 486 | result = acpi_battery_get_info(battery); | 487 | result = acpi_battery_get_info(battery); |
| 487 | if (result) | 488 | if (result) |
| 488 | return result; | 489 | return result; |
