Skip to content
Commit 28f7b858 authored by Armin Wolf's avatar Armin Wolf Committed by Rafael J. Wysocki
Browse files

ACPI: EC: Limit explicit removal of query handlers to custom query handlers



According to the ACPI spec part 5.6.4.1.2, EC query handlers discovered
thru ACPI should not be removed when a driver removes his custom query
handler. On the Acer Travelmate 4002WLMi for example, such a query
handler is used as a fallback to handle the EC SMBus alert when no driver
is present.
Change acpi_ec_remove_query_handlers() so that only custom query
handlers are removed then remove_all is false. Query handlers discovered
thru ACPI will still get removed when remove_all is true, which happens
on device removal. Also add a simple check to ensure that
acpi_ec_add_query_handler() is always called with either handle or func
being set, since custom query handlers are detected based whether
handlers->func is set or not.

Tested on a Acer Travelmate 4002WLMi.

Signed-off-by: default avatarArmin Wolf <W_Armin@gmx.de>
[ rjw: Comment adjustment ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 197b6b60
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment