Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63989
b: refs/heads/master
c: c4e7ac5
h: refs/heads/master
i:
  63987: 2445b61
v: v3
  • Loading branch information
Linus Torvalds committed Aug 14, 2007
1 parent 2166de2 commit 02b99f9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ce57a02c64052c3f1c62f30a902a937e6c316d88
refs/heads/master: c4e7ac5d427a48b91752671523f39a04e63e12ff
17 changes: 17 additions & 0 deletions trunk/drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,19 @@ static struct acpi_ec *make_acpi_ec(void)
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
ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
{
Expand All @@ -668,6 +681,10 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
if (ACPI_FAILURE(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? */
acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock);

Expand Down

0 comments on commit 02b99f9

Please sign in to comment.