Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84148
b: refs/heads/master
c: 653a00c
h: refs/heads/master
v: v3
  • Loading branch information
Zhang Rui authored and Len Brown committed Feb 2, 2008
1 parent e6a177f commit 15c83e8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cc0573b3250214034062ddf8c64359596d8af521
refs/heads/master: 653a00c9662304ef72a3eb4e681c91720960e0b4
42 changes: 24 additions & 18 deletions trunk/drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,9 @@ static int acpi_thermal_cooling_device_cb(struct thermal_zone_device *thermal,
{
struct acpi_device *device = cdev->devdata;
struct acpi_thermal *tz = thermal->devdata;
acpi_handle handle = device->handle;
struct acpi_device *dev;
acpi_status status;
acpi_handle handle;
int i;
int j;
int trip = -1;
Expand All @@ -1031,12 +1033,13 @@ static int acpi_thermal_cooling_device_cb(struct thermal_zone_device *thermal,
trip++;
for (i = 0; i < tz->trips.passive.devices.count;
i++) {
if (tz->trips.passive.devices.handles[i] !=
handle)
continue;
result = action(thermal, trip, cdev);
if (result)
goto failed;
handle = tz->trips.passive.devices.handles[i];
status = acpi_bus_get_device(handle, &dev);
if (ACPI_SUCCESS(status) && (dev == device)) {
result = action(thermal, trip, cdev);
if (result)
goto failed;
}
}
}

Expand All @@ -1047,21 +1050,24 @@ static int acpi_thermal_cooling_device_cb(struct thermal_zone_device *thermal,
for (j = 0;
j < tz->trips.active[i].devices.count;
j++) {
if (tz->trips.active[i].devices.
handles[j] != handle)
continue;
result = action(thermal, trip, cdev);
if (result)
goto failed;
handle = tz->trips.active[i].devices.handles[j];
status = acpi_bus_get_device(handle, &dev);
if (ACPI_SUCCESS(status) && (dev == device)) {
result = action(thermal, trip, cdev);
if (result)
goto failed;
}
}
}

for (i = 0; i < tz->devices.count; i++) {
if (tz->devices.handles[i] != handle)
continue;
result = action(thermal, -1, cdev);
if (result)
goto failed;
handle = tz->devices.handles[i];
status = acpi_bus_get_device(handle, &dev);
if (ACPI_SUCCESS(status) && (dev == device)) {
result = action(thermal, -1, cdev);
if (result)
goto failed;
}
}

failed:
Expand Down

0 comments on commit 15c83e8

Please sign in to comment.