thermal/core: Move thermal_set_delay_jiffies to static
authorDaniel Lezcano <daniel.lezcano@linexp.org>
Fri, 22 Jul 2022 20:00:03 +0000 (22:00 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 28 Jul 2022 15:29:55 +0000 (17:29 +0200)
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 <abailon@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linexp.org>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://lore.kernel.org/r/20220722200007.1839356-7-daniel.lezcano@linexp.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/thermal_core.c
drivers/thermal/thermal_core.h
drivers/thermal/thermal_helpers.c

index 6afdf0661d6a881addd2298366d03d7605b04d89..14f31e56c2a0474c1c73f05b4339bb7b70da0134 100644 (file)
@@ -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
index 60844e2d59bbe3b67d726a207650cff58f1eb3ab..c991bb290512ca38a7ad19b31a70ddeb9bb28683 100644 (file)
@@ -112,7 +112,6 @@ int thermal_build_list_of_policies(char *buf);
 
 /* Helpers */
 void thermal_zone_set_trips(struct thermal_zone_device *tz);
-void thermal_set_delay_jiffies(unsigned long *delay_jiffies, int delay_ms);
 
 /* sysfs I/F */
 int thermal_zone_create_device_groups(struct thermal_zone_device *, int);
index f4c1e87ef040e0b3bc5036637c6d278d66b8eb17..60bfda1a1db7819833d8dc2aa2aefe59e30ea4ff 100644 (file)
@@ -174,13 +174,6 @@ 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)
 {