ACPI / EC: Add EC_FLAGS_QUERY_ENABLED to reveal a hidden logic
authorLv Zheng <lv.zheng@intel.com>
Wed, 3 Aug 2016 08:01:24 +0000 (16:01 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 30 Aug 2016 22:32:10 +0000 (00:32 +0200)
commit750f628be68e8b8e1624d8abd003b9f1fc758ed6
treefe4ea4b8c29a0448420106ed5a7e4ed2ec793464
parentdf45db6177f8dde380d44149cca46ad800a00575
ACPI / EC: Add EC_FLAGS_QUERY_ENABLED to reveal a hidden logic

There is a hidden logic in the EC driver:
1. During boot, EC_FLAGS_QUERY_PENDING is responsible for blocking event
   handling;
2. During suspend, EC_FLAGS_STARTED is responsible for blocking event
   handling.
This patch uses a new EC_FLAGS_QUERY_ENABLED flag to make this hidden
logic explicit and have code cleaned up. No functional change.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Tested-by: Todd E Brandt <todd.e.brandt@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ec.c