summaryrefslogtreecommitdiff
path: root/include/linux/thermal.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-07-05 21:44:50 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-07-09 18:19:24 +0200
commitd05374dee295d771261d382f97c0c23cb15aa104 (patch)
treeda93c4ff681ac66cf1b13fa5d354f58b364abbed /include/linux/thermal.h
parent4acab508eb03dc1827db6005764de29299e07569 (diff)
downloadlwn-d05374dee295d771261d382f97c0c23cb15aa104.tar.gz
lwn-d05374dee295d771261d382f97c0c23cb15aa104.zip
thermal: core: Change passive_delay and polling_delay data type
It is better to use unsigned int as the data type for the passive_delay and polling_delay arguments of thermal_zone_device_register_with_trips() because they are implicitly cast to unsigned int anyway in thermal_set_delay_jiffies() and if they happen to be negative at that point, the resulting behavior may not be as desired. Update the thermal_zone_device_register_with_trips() definition accordingly. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://patch.msgid.link/5803791.DvuYhMxLoT@rjwysocki.net Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r--include/linux/thermal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index f732dab20368..cd0045915af5 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -221,7 +221,8 @@ struct thermal_zone_device *thermal_zone_device_register_with_trips(
int num_trips, void *devdata,
const struct thermal_zone_device_ops *ops,
const struct thermal_zone_params *tzp,
- int passive_delay, int polling_delay);
+ unsigned int passive_delay,
+ unsigned int polling_delay);
struct thermal_zone_device *thermal_tripless_zone_device_register(
const char *type,