From d5a5911b3278bad6515a9958f7318f74d534ef64 Mon Sep 17 00:00:00 2001
From: Lan Tianyu <tianyu.lan@intel.com>
Date: Thu, 30 Jun 2011 11:33:40 +0800
Subject: [PATCH] ACPI / Battery: Add the hibernation process in the
 battery_notify()
Git-commit: d5a5911b3278bad6515a9958f7318f74d534ef64
Patch-mainline: 3.1-rc1
References: bnc#738056

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>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/acpi/battery.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -948,6 +948,7 @@
 	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);
