Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c019b1933015ee31366eeaa085bad3ee9516991c
Commit:     c019b1933015ee31366eeaa085bad3ee9516991c
Parent:     39d3520c92cf7a28c07229ca00cc35a1e8026c77
Author:     Alexey Starikovskiy <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 14 01:03:42 2007 -0400
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Tue Aug 14 01:03:42 2007 -0400

    ACPI: EC: Fix "no battery" regression
    
    Restore deleted call to register query methods.
    
    http://bugzilla.kernel.org/show_bug.cgi?id=8886
    
    Signed-off-by: Alexey Starikovskiy <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/ec.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 2300d81..56bee9e 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -652,6 +652,19 @@ static struct acpi_ec *make_acpi_ec(void)
 }
 
 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)
 {
        acpi_status status;
@@ -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);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to