From e5f2cda61d068e14af95ed8ee74c80e565af3f29 Mon Sep 17 00:00:00 2001 From: Daniel Lezcano Date: Fri, 22 Jul 2022 22:00:03 +0200 Subject: thermal/core: Move thermal_set_delay_jiffies to static The function 'thermal_set_delay_jiffies' is only used in thermal_core.c but it is defined and implemented in a separate file. Move the function to thermal_core.c and make it static. Cc: Alexandre Bailon Cc: Kevin Hilman Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20220722200007.1839356-7-daniel.lezcano@linexp.org Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/thermal/thermal_core.c') diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 6afdf0661d6a..14f31e56c2a0 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1155,6 +1155,13 @@ exit: mutex_unlock(&thermal_list_lock); } +static 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); +} + /** * thermal_zone_device_register() - register a new thermal zone device * @type: the thermal zone device type -- cgit v1.2.3