Skip to content

Commit

Permalink
ACPI / thermal: Use THERMAL_TRIPS_NONE macro to replace number
Browse files Browse the repository at this point in the history
It's unreadable to pass "-1" as trip parameter directly to
thermal_zone_bind_cooling_device().  Use THERMAL_TRIPS_NONE instead.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Lan Tianyu authored and Rafael J. Wysocki committed Aug 14, 2013
1 parent b22131c commit 70f2903
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,12 +843,13 @@ static int acpi_thermal_cooling_device_cb(struct thermal_zone_device *thermal,
if (ACPI_SUCCESS(status) && (dev == device)) {
if (bind)
result = thermal_zone_bind_cooling_device
(thermal, -1, cdev,
THERMAL_NO_LIMIT,
(thermal, THERMAL_TRIPS_NONE,
cdev, THERMAL_NO_LIMIT,
THERMAL_NO_LIMIT);
else
result = thermal_zone_unbind_cooling_device
(thermal, -1, cdev);
(thermal, THERMAL_TRIPS_NONE,
cdev);
if (result)
goto failed;
}
Expand Down

0 comments on commit 70f2903

Please sign in to comment.