summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/battery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 75f39f2..52df994 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -567,13 +567,13 @@ static int acpi_battery_update(struct acpi_battery *battery)
result = acpi_battery_get_status(battery);
if (result)
return result;
-#ifdef CONFIG_ACPI_SYSFS_POWER
if (!acpi_battery_present(battery)) {
+#ifdef CONFIG_ACPI_SYSFS_POWER
sysfs_remove_battery(battery);
+#endif
battery->update_time = 0;
return 0;
}
-#endif
if (!battery->update_time ||
old_present != acpi_battery_present(battery)) {
result = acpi_battery_get_info(battery);
OpenPOWER on IntegriCloud