]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / EC: Cleanup QR_EC related code
authorLv Zheng <lv.zheng@intel.com>
Wed, 14 Jan 2015 11:28:53 +0000 (19:28 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 23 Jan 2015 21:06:49 +0000 (22:06 +0100)
commit8b02c6a0f6e319266d0dd5149400ed076d8b75c6
treea348dd2ecfb05cddb5a5de9122d3477792d45690
parent27cade729679c36a157ca4a032f058c39c918eb1
ACPI / EC: Cleanup QR_EC related code

The QR_EC related code pieces have redundants, this patch merges them into
acpi_ec_query() which invokes acpi_ec_transaction() where EC mutex and the
global lock are already held. After doing so, query handler traversal still
need to be locked by EC mutex after invoking acpi_ec_transaction().

Note that EC event handling is sequential. We fetch one event from firmware
event queue and process it until 0x00 or error returned. So we don't need
to hold mutex for whole acpi_ec_clear() process to determine whether we
should continue to drain. And for the same reason, we don't need to hold
mutex for the whole procedure from the QR_EC transaction to the query
handler traversal.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ec.c