diff options
author | Lan Tianyu <tianyu.lan@intel.com> | 2011-06-29 23:33:40 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-07-14 00:05:27 -0400 |
commit | d5a5911b3278bad6515a9958f7318f74d534ef64 (patch) | |
tree | 598ae80fbb08c82d7b97e420d4e0fcad5dcf2a51 /drivers/acpi/battery.c | |
parent | 7b78622d0f9df9f274a319eea1494240119d3734 (diff) |
ACPI / Battery: Add the hibernation process in the battery_notify()
The Commit 25be58215 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>
Diffstat (limited to 'drivers/acpi/battery.c')
-rw-r--r-- | drivers/acpi/battery.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index ba7926fce4fb..2fe7cfd95680 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
@@ -947,6 +947,7 @@ static int battery_notify(struct notifier_block *nb, | |||
947 | struct acpi_battery *battery = container_of(nb, struct acpi_battery, | 947 | struct acpi_battery *battery = container_of(nb, struct acpi_battery, |
948 | pm_nb); | 948 | pm_nb); |
949 | switch (mode) { | 949 | switch (mode) { |
950 | case PM_POST_HIBERNATION: | ||
950 | case PM_POST_SUSPEND: | 951 | case PM_POST_SUSPEND: |
951 | sysfs_remove_battery(battery); | 952 | sysfs_remove_battery(battery); |
952 | sysfs_add_battery(battery); | 953 | sysfs_add_battery(battery); |