From: Lan Tianyu Date: Thu, 30 Jun 2011 03:33:40 +0000 (+0800) Subject: ACPI / Battery: Add the hibernation process in the battery_notify() X-Git-Tag: upstream/snapshot3+hdmi~9324^2^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d5a5911b3278bad6515a9958f7318f74d534ef64;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Len Brown --- diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index ba7926fc..2fe7cfd 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -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);