Revert "ACPI battery: update status upon sysfs query"
authorLen Brown <len.brown@intel.com>
Sat, 25 Dec 2010 02:43:16 +0000 (21:43 -0500)
committerLen Brown <len.brown@intel.com>
Sat, 25 Dec 2010 02:43:16 +0000 (21:43 -0500)
This reverts commit 3138b32d5e0998ba3cbd1c74bdc1887d74c5279b.

as it caused a crash upon battery removal:
https://bugzilla.kernel.org/show_bug.cgi?id=25302

Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/battery.c

index 9fb9d5ac939db1c071c4cdcaa7fba49364236e25..95649d373071ac93d14bbbb478db1ab4a8cdb801 100644 (file)
@@ -130,8 +130,6 @@ struct acpi_battery {
        unsigned long flags;
 };
 
-static int acpi_battery_update(struct acpi_battery *battery);
-
 #define to_acpi_battery(x) container_of(x, struct acpi_battery, bat);
 
 inline int acpi_battery_present(struct acpi_battery *battery)
@@ -186,9 +184,6 @@ static int acpi_battery_get_property(struct power_supply *psy,
        int ret = 0;
        struct acpi_battery *battery = to_acpi_battery(psy);
 
-       if (acpi_battery_update(battery))
-               return -ENODEV;
-
        if (acpi_battery_present(battery)) {
                /* run battery update only if it is present */
                acpi_battery_get_state(battery);