]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / Battery: Add the check before refresh sysfs in the battery_notify()
authorLan Tianyu <tianyu.lan@intel.com>
Thu, 30 Jun 2011 03:33:58 +0000 (11:33 +0800)
committerLen Brown <len.brown@intel.com>
Thu, 14 Jul 2011 04:05:45 +0000 (00:05 -0400)
commit8a1bc58da28cc041a4ff174b877a20d80fea7c4b
tree6a3874a0331fcd4e4ff9d44df720028ee8165a06
parent86256157a0caf6b62e5fb323354a371933beff26
ACPI / Battery: Add the check before refresh sysfs in the battery_notify()

In the commit 1bf2ec16, add the refresh sysfs when system resumes
from suspending. But it didn't check that the battery exists. This
will cause battery sysfs files added when the battery doesn't exist.
This patch add the check before refreshing.

https://bugzilla.kernel.org/show_bug.cgi?id=35642

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/battery.c