]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
ACPI / Battery: remove battery refresh on resume
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Jan 2011 21:14:10 +0000 (13:14 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Jan 2011 21:14:10 +0000 (13:14 -0800)
This partially reverts commit da8aeb92d4853f37e281f11fddf61f9c7d84c3cd
("ACPI / Battery: Update information on info notification and resume"),
which causes a hang on resume on at least some machines.

This bug was bisected on an ASUS EeePC 901, which hangs at resume time
if we do that "acpi_battery_refresh(battery)" in the battery resume
function.

Rafael suspects we'll still need to refresh the sysfs files upon resume,
but that that can be done from a PM notifier (that will run after
thawing user space).

Bisected-and-tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Len Brown <len.brown@intel.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/acpi/battery.c

index 68bc227e7c4cc45b80e74e7f354826e6788ec6ad..ac1a599f5147640cc58135391260f0f202a411b1 100644 (file)
@@ -998,7 +998,6 @@ static int acpi_battery_resume(struct acpi_device *device)
        if (!device)
                return -EINVAL;
        battery = acpi_driver_data(device);
-       acpi_battery_refresh(battery);
        battery->update_time = 0;
        acpi_battery_update(battery);
        return 0;