OSDN Git Service

ACPI: Use acpi_fetch_acpi_dev() instead of acpi_bus_get_device()
[uclinux-h8/linux.git] / drivers / acpi / thermal.c
index 95105db..75cda13 100644 (file)
@@ -697,7 +697,6 @@ static int acpi_thermal_cooling_device_cb(struct thermal_zone_device *thermal,
        struct acpi_device *device = cdev->devdata;
        struct acpi_thermal *tz = thermal->devdata;
        struct acpi_device *dev;
-       acpi_status status;
        acpi_handle handle;
        int i;
        int j;
@@ -715,8 +714,8 @@ static int acpi_thermal_cooling_device_cb(struct thermal_zone_device *thermal,
                for (i = 0; i < tz->trips.passive.devices.count;
                    i++) {
                        handle = tz->trips.passive.devices.handles[i];
-                       status = acpi_bus_get_device(handle, &dev);
-                       if (ACPI_FAILURE(status) || dev != device)
+                       dev = acpi_fetch_acpi_dev(handle);
+                       if (dev != device)
                                continue;
                        if (bind)
                                result =
@@ -741,8 +740,8 @@ static int acpi_thermal_cooling_device_cb(struct thermal_zone_device *thermal,
                    j < tz->trips.active[i].devices.count;
                    j++) {
                        handle = tz->trips.active[i].devices.handles[j];
-                       status = acpi_bus_get_device(handle, &dev);
-                       if (ACPI_FAILURE(status) || dev != device)
+                       dev = acpi_fetch_acpi_dev(handle);
+                       if (dev != device)
                                continue;
                        if (bind)
                                result = thermal_zone_bind_cooling_device