diff options
Diffstat (limited to 'drivers/thermal/thermal_helpers.c')
-rw-r--r-- | drivers/thermal/thermal_helpers.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c index c94bc824e5d3..7f50f412e02a 100644 --- a/drivers/thermal/thermal_helpers.c +++ b/drivers/thermal/thermal_helpers.c @@ -175,6 +175,13 @@ exit: mutex_unlock(&tz->lock); } +void thermal_set_delay_jiffies(unsigned long *delay_jiffies, int delay_ms) +{ + *delay_jiffies = msecs_to_jiffies(delay_ms); + if (delay_ms > 1000) + *delay_jiffies = round_jiffies(*delay_jiffies); +} + static void thermal_cdev_set_cur_state(struct thermal_cooling_device *cdev, int target) { |