diff options
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r-- | drivers/acpi/dock.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 05ea4be01a83..ca86c1ce7c8a 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -441,7 +441,7 @@ static void handle_dock(struct dock_station *ds, int dock) | |||
441 | acpi_status status; | 441 | acpi_status status; |
442 | struct acpi_object_list arg_list; | 442 | struct acpi_object_list arg_list; |
443 | union acpi_object arg; | 443 | union acpi_object arg; |
444 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 444 | unsigned long long value; |
445 | 445 | ||
446 | acpi_handle_info(ds->handle, "%s\n", dock ? "docking" : "undocking"); | 446 | acpi_handle_info(ds->handle, "%s\n", dock ? "docking" : "undocking"); |
447 | 447 | ||
@@ -450,12 +450,10 @@ static void handle_dock(struct dock_station *ds, int dock) | |||
450 | arg_list.pointer = &arg; | 450 | arg_list.pointer = &arg; |
451 | arg.type = ACPI_TYPE_INTEGER; | 451 | arg.type = ACPI_TYPE_INTEGER; |
452 | arg.integer.value = dock; | 452 | arg.integer.value = dock; |
453 | status = acpi_evaluate_object(ds->handle, "_DCK", &arg_list, &buffer); | 453 | status = acpi_evaluate_integer(ds->handle, "_DCK", &arg_list, &value); |
454 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) | 454 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) |
455 | acpi_handle_err(ds->handle, "Failed to execute _DCK (0x%x)\n", | 455 | acpi_handle_err(ds->handle, "Failed to execute _DCK (0x%x)\n", |
456 | status); | 456 | status); |
457 | |||
458 | kfree(buffer.pointer); | ||
459 | } | 457 | } |
460 | 458 | ||
461 | static inline void dock(struct dock_station *ds) | 459 | static inline void dock(struct dock_station *ds) |