diff mbox

[1/2] ACPI: battery: Fix CONFIG_ACPI_SYSFS_POWER=n

Message ID 4B22274A.1000003@tuffmail.co.uk (mailing list archive)
State RFC, archived
Headers show

Commit Message

Alan Jenkins Dec. 11, 2009, 11:04 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 3f4602b..ed4aeab 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -522,13 +522,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);