diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/scan.c | 3 | ||||
-rw-r--r-- | drivers/acpi/wmi.c | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index b26e3019e1cc..57570ac47803 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -609,7 +609,8 @@ acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd) | |||
609 | status = acpi_evaluate_object(handle, "_EJD", NULL, &buffer); | 609 | status = acpi_evaluate_object(handle, "_EJD", NULL, &buffer); |
610 | if (ACPI_SUCCESS(status)) { | 610 | if (ACPI_SUCCESS(status)) { |
611 | obj = buffer.pointer; | 611 | obj = buffer.pointer; |
612 | status = acpi_get_handle(NULL, obj->string.pointer, ejd); | 612 | status = acpi_get_handle(ACPI_ROOT_OBJECT, obj->string.pointer, |
613 | ejd); | ||
613 | kfree(buffer.pointer); | 614 | kfree(buffer.pointer); |
614 | } | 615 | } |
615 | return status; | 616 | return status; |
diff --git a/drivers/acpi/wmi.c b/drivers/acpi/wmi.c index efacc9f8bfe3..c33b1c6e93b1 100644 --- a/drivers/acpi/wmi.c +++ b/drivers/acpi/wmi.c | |||
@@ -293,7 +293,7 @@ struct acpi_buffer *out) | |||
293 | { | 293 | { |
294 | struct guid_block *block = NULL; | 294 | struct guid_block *block = NULL; |
295 | struct wmi_block *wblock = NULL; | 295 | struct wmi_block *wblock = NULL; |
296 | acpi_handle handle; | 296 | acpi_handle handle, wc_handle; |
297 | acpi_status status, wc_status = AE_ERROR; | 297 | acpi_status status, wc_status = AE_ERROR; |
298 | struct acpi_object_list input, wc_input; | 298 | struct acpi_object_list input, wc_input; |
299 | union acpi_object wc_params[1], wq_params[1]; | 299 | union acpi_object wc_params[1], wq_params[1]; |
@@ -338,8 +338,10 @@ struct acpi_buffer *out) | |||
338 | * expensive, but have no corresponding WCxx method. So we | 338 | * expensive, but have no corresponding WCxx method. So we |
339 | * should not fail if this happens. | 339 | * should not fail if this happens. |
340 | */ | 340 | */ |
341 | wc_status = acpi_evaluate_object(handle, wc_method, | 341 | wc_status = acpi_get_handle(handle, wc_method, &wc_handle); |
342 | &wc_input, NULL); | 342 | if (ACPI_SUCCESS(wc_status)) |
343 | wc_status = acpi_evaluate_object(handle, wc_method, | ||
344 | &wc_input, NULL); | ||
343 | } | 345 | } |
344 | 346 | ||
345 | strcpy(method, "WQ"); | 347 | strcpy(method, "WQ"); |
@@ -351,7 +353,7 @@ struct acpi_buffer *out) | |||
351 | * If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if | 353 | * If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if |
352 | * the WQxx method failed - we should disable collection anyway. | 354 | * the WQxx method failed - we should disable collection anyway. |
353 | */ | 355 | */ |
354 | if ((block->flags & ACPI_WMI_EXPENSIVE) && wc_status) { | 356 | if ((block->flags & ACPI_WMI_EXPENSIVE) && ACPI_SUCCESS(wc_status)) { |
355 | wc_params[0].integer.value = 0; | 357 | wc_params[0].integer.value = 0; |
356 | status = acpi_evaluate_object(handle, | 358 | status = acpi_evaluate_object(handle, |
357 | wc_method, &wc_input, NULL); | 359 | wc_method, &wc_input, NULL); |