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>
This commit is contained in:
parent
3d97e426aa
commit
3082373616
1 changed files with 9 additions and 6 deletions
|
@ -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,
|
static acpi_status sony_walk_callback(acpi_handle handle, u32 level,
|
||||||
void *context, void **return_value)
|
void *context, void **return_value)
|
||||||
{
|
{
|
||||||
struct acpi_namespace_node *node;
|
struct acpi_device_info *info;
|
||||||
union acpi_operand_object *operand;
|
struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
|
||||||
|
|
||||||
node = (struct acpi_namespace_node *)handle;
|
if (ACPI_SUCCESS(acpi_get_object_info(handle, &buffer))) {
|
||||||
operand = (union acpi_operand_object *)node->object;
|
info = buffer.pointer;
|
||||||
|
|
||||||
printk(KERN_WARNING DRV_PFX "method: name: %4.4s, args %X\n", node->name.ascii,
|
printk(KERN_WARNING DRV_PFX "method: name: %4.4s, args %X\n",
|
||||||
(u32) operand->method.param_count);
|
(char *)&info->name, info->param_count);
|
||||||
|
|
||||||
|
kfree(buffer.pointer);
|
||||||
|
}
|
||||||
|
|
||||||
return AE_OK;
|
return AE_OK;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue