Commit c019b193 authored by Alexey Starikovskiy's avatar Alexey Starikovskiy Committed by Len Brown

ACPI: EC: Fix "no battery" regression

Restore deleted call to register query methods.

http://bugzilla.kernel.org/show_bug.cgi?id=8886Signed-off-by: default avatarAlexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 39d3520c
...@@ -651,6 +651,19 @@ static struct acpi_ec *make_acpi_ec(void) ...@@ -651,6 +651,19 @@ static struct acpi_ec *make_acpi_ec(void)
return ec; return ec;
} }
static acpi_status
acpi_ec_register_query_methods(acpi_handle handle, u32 level,
void *context, void **return_value)
{
struct acpi_namespace_node *node = handle;
struct acpi_ec *ec = context;
int value = 0;
if (sscanf(node->name.ascii, "_Q%x", &value) == 1) {
acpi_ec_add_query_handler(ec, value, handle, NULL, NULL);
}
return AE_OK;
}
static acpi_status static acpi_status
ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
{ {
...@@ -668,6 +681,10 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) ...@@ -668,6 +681,10 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
return status; return status;
/* Find and register all query methods */
acpi_walk_namespace(ACPI_TYPE_METHOD, handle, 1,
acpi_ec_register_query_methods, ec, NULL);
/* Use the global lock for all EC transactions? */ /* Use the global lock for all EC transactions? */
acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock); acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment