Commit cde44d17 authored by Len Brown's avatar Len Brown

Revert "ACPI battery: update status upon sysfs query"

This reverts commit 3138b32d.

as it caused a crash upon battery removal: default avatarLen Brown <>
parent 3138b32d
......@@ -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 */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment