diff options
author | Len Brown <len.brown@intel.com> | 2009-09-19 01:45:22 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-09-19 01:45:22 -0400 |
commit | 985f38781d19101aba121df423f92c87b208c6df (patch) | |
tree | 21b10413b6e24c0eaf5c3b2432e936749a672644 /drivers/acpi/dock.c | |
parent | d093d70a81b08673d1577ad73419998f02be9d29 (diff) | |
parent | c9766237afa92e8d7f27bbcd4964f1b43fa0bce8 (diff) |
Merge branch 'acpica' into release
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r-- | drivers/acpi/dock.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 9a855669ff12..3a2cfefc71ab 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -233,18 +233,16 @@ static int is_ata(acpi_handle handle) | |||
233 | static int is_battery(acpi_handle handle) | 233 | static int is_battery(acpi_handle handle) |
234 | { | 234 | { |
235 | struct acpi_device_info *info; | 235 | struct acpi_device_info *info; |
236 | struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; | ||
237 | int ret = 1; | 236 | int ret = 1; |
238 | 237 | ||
239 | if (!ACPI_SUCCESS(acpi_get_object_info(handle, &buffer))) | 238 | if (!ACPI_SUCCESS(acpi_get_object_info(handle, &info))) |
240 | return 0; | 239 | return 0; |
241 | info = buffer.pointer; | ||
242 | if (!(info->valid & ACPI_VALID_HID)) | 240 | if (!(info->valid & ACPI_VALID_HID)) |
243 | ret = 0; | 241 | ret = 0; |
244 | else | 242 | else |
245 | ret = !strcmp("PNP0C0A", info->hardware_id.value); | 243 | ret = !strcmp("PNP0C0A", info->hardware_id.string); |
246 | 244 | ||
247 | kfree(buffer.pointer); | 245 | kfree(info); |
248 | return ret; | 246 | return ret; |
249 | } | 247 | } |
250 | 248 | ||