Merge tag 'microblaze-v5.12' of git://git.monstr.eu/linux-2.6-microblaze
[linux-2.6-microblaze.git] / drivers / thermal / thermal_helpers.c
index c94bc82..7f50f41 100644 (file)
@@ -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)
 {