Skip to content

Commit

Permalink
Revert "ACPI battery: update status upon sysfs query"
Browse files Browse the repository at this point in the history
This reverts commit 3138b32.

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>
  • Loading branch information
Len Brown committed Dec 25, 2010
1 parent 3138b32 commit cde44d1
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/acpi/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit cde44d1

Please sign in to comment.