diff options
author | Lin Ming <ming.m.lin@intel.com> | 2008-12-16 03:46:12 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-12-31 01:06:55 -0500 |
commit | 0175d562a29ad052c510782c7e76bc63d5155b9b (patch) | |
tree | 50790da5cfde44630f80fe35c89ad9e571b36d69 /drivers/acpi | |
parent | 889c78be9e8d84ea7f991b9b868e006cdb8e42b0 (diff) |
ACPI: ec.c: call acpi_get_name to get node name
acpi_namespace_node is internal struct, it should not be used outside of ACPICA
call acpi_get_name to get node ascii name
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/ec.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 30f3ef236ecb..2cbc2c9c07ac 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -756,10 +756,15 @@ static acpi_status | |||
756 | acpi_ec_register_query_methods(acpi_handle handle, u32 level, | 756 | acpi_ec_register_query_methods(acpi_handle handle, u32 level, |
757 | void *context, void **return_value) | 757 | void *context, void **return_value) |
758 | { | 758 | { |
759 | struct acpi_namespace_node *node = handle; | 759 | char node_name[5]; |
760 | struct acpi_buffer buffer = { sizeof(node_name), node_name }; | ||
760 | struct acpi_ec *ec = context; | 761 | struct acpi_ec *ec = context; |
761 | int value = 0; | 762 | int value = 0; |
762 | if (sscanf(node->name.ascii, "_Q%x", &value) == 1) { | 763 | acpi_status status; |
764 | |||
765 | status = acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer); | ||
766 | |||
767 | if (ACPI_SUCCESS(status) && sscanf(node_name, "_Q%x", &value) == 1) { | ||
763 | acpi_ec_add_query_handler(ec, value, handle, NULL, NULL); | 768 | acpi_ec_add_query_handler(ec, value, handle, NULL, NULL); |
764 | } | 769 | } |
765 | return AE_OK; | 770 | return AE_OK; |