Skip to content

Commit

Permalink
ACPI / Battery: Add the hibernation process in the battery_notify()
Browse files Browse the repository at this point in the history
The Commit 25be582 has added a PM notifier to refresh the sys in order
to deal with the unit change of the Battery Present Rate. But it just
consided the suspend situation. The problem also will happen during the
hibernation according the bug 28192.

    https://bugzilla.kernel.org/show_bug.cgi?id=28192

This patch adds the hibernation process and fix the bug.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Lan Tianyu authored and Len Brown committed Jul 14, 2011
1 parent 7b78622 commit d5a5911
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/acpi/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,7 @@ static int battery_notify(struct notifier_block *nb,
struct acpi_battery *battery = container_of(nb, struct acpi_battery,
pm_nb);
switch (mode) {
case PM_POST_HIBERNATION:
case PM_POST_SUSPEND:
sysfs_remove_battery(battery);
sysfs_add_battery(battery);
Expand Down

0 comments on commit d5a5911

Please sign in to comment.