diff options
Diffstat (limited to 'drivers/acpi/glue.c')
-rw-r--r-- | drivers/acpi/glue.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index dc36a448de43..c6645f26224b 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c | |||
@@ -95,15 +95,13 @@ do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
95 | { | 95 | { |
96 | acpi_status status; | 96 | acpi_status status; |
97 | struct acpi_device_info *info; | 97 | struct acpi_device_info *info; |
98 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
99 | struct acpi_find_child *find = context; | 98 | struct acpi_find_child *find = context; |
100 | 99 | ||
101 | status = acpi_get_object_info(handle, &buffer); | 100 | status = acpi_get_object_info(handle, &info); |
102 | if (ACPI_SUCCESS(status)) { | 101 | if (ACPI_SUCCESS(status)) { |
103 | info = buffer.pointer; | ||
104 | if (info->address == find->address) | 102 | if (info->address == find->address) |
105 | find->handle = handle; | 103 | find->handle = handle; |
106 | kfree(buffer.pointer); | 104 | kfree(info); |
107 | } | 105 | } |
108 | return AE_OK; | 106 | return AE_OK; |
109 | } | 107 | } |
@@ -123,7 +121,7 @@ EXPORT_SYMBOL(acpi_get_child); | |||
123 | 121 | ||
124 | /* Link ACPI devices with physical devices */ | 122 | /* Link ACPI devices with physical devices */ |
125 | static void acpi_glue_data_handler(acpi_handle handle, | 123 | static void acpi_glue_data_handler(acpi_handle handle, |
126 | u32 function, void *context) | 124 | void *context) |
127 | { | 125 | { |
128 | /* we provide an empty handler */ | 126 | /* we provide an empty handler */ |
129 | } | 127 | } |