]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / Battery: Update information on info notification and resume
authorRafael J. Wysocki <rjw@sisk.pl>
Thu, 6 Jan 2011 22:42:27 +0000 (23:42 +0100)
committerLen Brown <len.brown@intel.com>
Wed, 12 Jan 2011 10:06:10 +0000 (05:06 -0500)
commitd00f3e1c27285aca6bbde0fe27a676d82933d726
tree784dda3d8ce144a6b79fbace9a6223568b0031d4
parent8258f7c12457e16d7e1e731cabe62376868f1b5c
ACPI / Battery: Update information on info notification and resume

A notification event 0x81 from an ACPI battery device requires us to
re-read the battery information structure.  Follow this requirement
and remove and re-create the battery's attibutes in sysfs so that
they reflect the reporting units used by the battery at the moment
(those units may actually change sometimes at run time, which happens
on some Thinkpads).

The approach used in this patch was suggested by Matthew Garrett.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/battery.c