Commit d5a5911b authored by Lan Tianyu's avatar Lan Tianyu Committed by Len Brown

ACPI / Battery: Add the hibernation process in the battery_notify()

The Commit 25be5821 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: default avatarLan Tianyu <tianyu.lan@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 7b78622d
...@@ -947,6 +947,7 @@ static int battery_notify(struct notifier_block *nb, ...@@ -947,6 +947,7 @@ static int battery_notify(struct notifier_block *nb,
struct acpi_battery *battery = container_of(nb, struct acpi_battery, struct acpi_battery *battery = container_of(nb, struct acpi_battery,
pm_nb); pm_nb);
switch (mode) { switch (mode) {
case PM_POST_HIBERNATION:
case PM_POST_SUSPEND: case PM_POST_SUSPEND:
sysfs_remove_battery(battery); sysfs_remove_battery(battery);
sysfs_add_battery(battery); sysfs_add_battery(battery);
......
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