summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2008-12-16 11:59:35 +0300
committerLen Brown <len.brown@intel.com>2008-12-31 09:11:35 +0300
commit30823736162ff91512965e3c730557e34fa71d6d (patch)
tree5b5440f9131fc521100325e74480d6128fbf2b9e /drivers/misc
parent3d97e426aa97d60b3dac1b72923b90b491fbac20 (diff)
downloadlinux-30823736162ff91512965e3c730557e34fa71d6d.tar.xz
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')
-rw-r--r--drivers/misc/sony-laptop.c15
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)
static acpi_status sony_walk_callback(acpi_handle handle, u32 level,
void *context, void **return_value)
{
- struct acpi_namespace_node *node;
- union acpi_operand_object *operand;
+ struct acpi_device_info *info;
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
- node = (struct acpi_namespace_node *)handle;
- operand = (union acpi_operand_object *)node->object;
+ if (ACPI_SUCCESS(acpi_get_object_info(handle, &buffer))) {
+ info = buffer.pointer;
- printk(KERN_WARNING DRV_PFX "method: name: %4.4s, args %X\n", node->name.ascii,
- (u32) operand->method.param_count);
+ printk(KERN_WARNING DRV_PFX "method: name: %4.4s, args %X\n",
+ (char *)&info->name, info->param_count);
+
+ kfree(buffer.pointer);
+ }
return AE_OK;
}