ACPI / EC: Cleanup first_ec/boot_ec code
authorLv Zheng <lv.zheng@intel.com>
Wed, 7 Sep 2016 08:50:08 +0000 (16:50 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 10 Sep 2016 00:33:49 +0000 (02:33 +0200)
commit72c77b7ea9ce781f4987840984a462e4456ba98e
tree5aa84ab38f1d66459b8c96223ed8b1d694e449af
parentd30283057ecdf8c543ae757ae34db3d7fd2d7732
ACPI / EC: Cleanup first_ec/boot_ec code

In order to support full ECDT (driving the ECDT EC after probing the
namespace EC), we need to change our EC device alloc/free algorithm, ensure
not to free old boot EC before qualifying new boot EC.
This patch achieves this by cleaning up first_ec/boot_ec logic:
1. first_ec: used to perform transactions, so it is assigned in new
   acpi_ec_setup() function.
2. boot_ec: used to track early EC device, so it is assigned in new
   acpi_config_boot_ec() function which explictly tells the driver to save
   the EC device as early EC device.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=115021
Reported-and-tested-by: Luya Tshimbalanga <luya@fedoraproject.org>
Tested-by: Jonh Henderson <jw.hendy@gmail.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ec.c