Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI / thermal: Use THERMAL_TRIPS_NONE macro to replace number

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>

authored by

Lan Tianyu and committed by
Rafael J. Wysocki
70f2903b b22131c2

+4 -3
+4 -3
drivers/acpi/thermal.c
··· 843 843 if (ACPI_SUCCESS(status) && (dev == device)) { 844 844 if (bind) 845 845 result = thermal_zone_bind_cooling_device 846 - (thermal, -1, cdev, 847 - THERMAL_NO_LIMIT, 846 + (thermal, THERMAL_TRIPS_NONE, 847 + cdev, THERMAL_NO_LIMIT, 848 848 THERMAL_NO_LIMIT); 849 849 else 850 850 result = thermal_zone_unbind_cooling_device 851 - (thermal, -1, cdev); 851 + (thermal, THERMAL_TRIPS_NONE, 852 + cdev); 852 853 if (result) 853 854 goto failed; 854 855 }