From: "lan,Tianyu" <tianyu.lan@intel.com>
To: linux acpi <linux-acpi@vger.kernel.org>, Len Brown <lenb@kernel.org>
Subject: [PATCH 3/3] ACPI / Battery: Add the hibernation process in the battery_notify()
Date: Mon, 20 Jun 2011 14:56:50 +0800 [thread overview]
Message-ID: <1308553010.18731.30.camel@lantianyu-ws> (raw)
The Commit 25be58215 has added a PM notifier to refresh the sysfs files
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.
---
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 0ae5b08..fbcdd55 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -942,6 +942,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);
--
1.7.1
reply other threads:[~2011-06-20 6:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1308553010.18731.30.camel@lantianyu-ws \
--to=tianyu.lan@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox