aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorAlexey Starikovskiy <astarikivskiy@suse.de>2007-08-14 01:03:42 -0400
committerLen Brown <len.brown@intel.com>2007-08-14 01:03:42 -0400
commitc019b1933015ee31366eeaa085bad3ee9516991c (patch)
treebce9f022b5960b774e68095aed062856ceb10c9f /drivers/acpi
parent39d3520c92cf7a28c07229ca00cc35a1e8026c77 (diff)
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 <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/ec.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 2300d81bbc4e..56bee9e065cf 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -652,6 +652,19 @@ static struct acpi_ec *make_acpi_ec(void)
652} 652}
653 653
654static acpi_status 654static acpi_status
655acpi_ec_register_query_methods(acpi_handle handle, u32 level,
656 void *context, void **return_value)
657{
658 struct acpi_namespace_node *node = handle;
659 struct acpi_ec *ec = context;
660 int value = 0;
661 if (sscanf(node->name.ascii, "_Q%x", &value) == 1) {
662 acpi_ec_add_query_handler(ec, value, handle, NULL, NULL);
663 }
664 return AE_OK;
665}
666
667static acpi_status
655ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) 668ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
656{ 669{
657 acpi_status status; 670 acpi_status status;
@@ -668,6 +681,10 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
668 if (ACPI_FAILURE(status)) 681 if (ACPI_FAILURE(status))
669 return status; 682 return status;
670 683
684 /* Find and register all query methods */
685 acpi_walk_namespace(ACPI_TYPE_METHOD, handle, 1,
686 acpi_ec_register_query_methods, ec, NULL);
687
671 /* Use the global lock for all EC transactions? */ 688 /* Use the global lock for all EC transactions? */
672 acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock); 689 acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock);
673 690