ACPI / AC: recheck adapter status upon battery status changes
authorAlexander Mezin <mezin.alexander@gmail.com>
Tue, 11 Mar 2014 17:58:48 +0000 (00:58 +0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 19 Mar 2014 00:57:47 +0000 (01:57 +0100)
commit4eee4f03ce7aea1ef212bb5c27a8b54d73315996
tree5a62923fa3d55cf0a91dd5d797cb957678d7f47b
parent411e0f77bdf79cdb80b61ab78acc6513c9ff8f97
ACPI / AC: recheck adapter status upon battery status changes

On HP Pavilion dv6-6179er there are no notifications when AC adapter
is plugged/unplugged.
However, when AC status is read (acpi_ac_get_state), and if AC status
has changed, AML code triggers the notification.

This patch solves the problem by re-reading AC adapter status upon
ACPI_BATTERY_NOTIFY_STATUS notification.

Signed-off-by: Alexander Mezin <mezin.alexander@gmail.com>
Acked-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ac.c