OSDN Git Service

ACPI: Use acpi_fetch_acpi_dev() instead of acpi_bus_get_device()
[uclinux-h8/linux.git] / drivers / acpi / resource.c
index 3c25ce8..c2d4947 100644 (file)
@@ -791,9 +791,9 @@ static acpi_status acpi_res_consumer_cb(acpi_handle handle, u32 depth,
 {
        struct resource *res = context;
        struct acpi_device **consumer = (struct acpi_device **) ret;
-       struct acpi_device *adev;
+       struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
 
-       if (acpi_bus_get_device(handle, &adev))
+       if (!adev)
                return AE_OK;
 
        if (acpi_dev_consumes_res(adev, res)) {