aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dock.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r--drivers/acpi/dock.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index efb959d6c8a9..39536b80bce7 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -231,18 +231,16 @@ static int is_ata(acpi_handle handle)
231static int is_battery(acpi_handle handle) 231static int is_battery(acpi_handle handle)
232{ 232{
233 struct acpi_device_info *info; 233 struct acpi_device_info *info;
234 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
235 int ret = 1; 234 int ret = 1;
236 235
237 if (!ACPI_SUCCESS(acpi_get_object_info(handle, &buffer))) 236 if (!ACPI_SUCCESS(acpi_get_object_info(handle, &info)))
238 return 0; 237 return 0;
239 info = buffer.pointer;
240 if (!(info->valid & ACPI_VALID_HID)) 238 if (!(info->valid & ACPI_VALID_HID))
241 ret = 0; 239 ret = 0;
242 else 240 else
243 ret = !strcmp("PNP0C0A", info->hardware_id.value); 241 ret = !strcmp("PNP0C0A", info->hardware_id.string);
244 242
245 kfree(buffer.pointer); 243 kfree(info);
246 return ret; 244 return ret;
247} 245}
248 246