diff options
author | Lin Ming <ming.m.lin@intel.com> | 2008-12-16 03:59:35 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-12-31 01:11:35 -0500 |
commit | 30823736162ff91512965e3c730557e34fa71d6d (patch) | |
tree | 5b5440f9131fc521100325e74480d6128fbf2b9e /drivers/misc/sony-laptop.c | |
parent | 3d97e426aa97d60b3dac1b72923b90b491fbac20 (diff) |
ACPI: sony-laptop.c: call acpi_get_object_info to get node info
Avoid using internal acpica structures acpi_namespace_node and acpi_operand_object
Call acpi_get_object_info to get node ascii name and method arg count
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/misc/sony-laptop.c')
-rw-r--r-- | drivers/misc/sony-laptop.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 571b211608d1..537959d07148 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c | |||
@@ -935,14 +935,17 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data) | |||
935 | static acpi_status sony_walk_callback(acpi_handle handle, u32 level, | 935 | static acpi_status sony_walk_callback(acpi_handle handle, u32 level, |
936 | void *context, void **return_value) | 936 | void *context, void **return_value) |
937 | { | 937 | { |
938 | struct acpi_namespace_node *node; | 938 | struct acpi_device_info *info; |
939 | union acpi_operand_object *operand; | 939 | struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; |
940 | 940 | ||
941 | node = (struct acpi_namespace_node *)handle; | 941 | if (ACPI_SUCCESS(acpi_get_object_info(handle, &buffer))) { |
942 | operand = (union acpi_operand_object *)node->object; | 942 | info = buffer.pointer; |
943 | 943 | ||
944 | printk(KERN_WARNING DRV_PFX "method: name: %4.4s, args %X\n", node->name.ascii, | 944 | printk(KERN_WARNING DRV_PFX "method: name: %4.4s, args %X\n", |
945 | (u32) operand->method.param_count); | 945 | (char *)&info->name, info->param_count); |
946 | |||
947 | kfree(buffer.pointer); | ||
948 | } | ||
946 | 949 | ||
947 | return AE_OK; | 950 | return AE_OK; |
948 | } | 951 | } |