Skip to content

Commit e5f2cda

Browse files
Daniel Lezcanodlezcano
authored andcommitted
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 <[email protected]> Cc: Kevin Hilman <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Reviewed-by: Lukasz Luba <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
1 parent 6390383 commit e5f2cda

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

drivers/thermal/thermal_core.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,13 @@ static void bind_tz(struct thermal_zone_device *tz)
11551155
mutex_unlock(&thermal_list_lock);
11561156
}
11571157

1158+
static void thermal_set_delay_jiffies(unsigned long *delay_jiffies, int delay_ms)
1159+
{
1160+
*delay_jiffies = msecs_to_jiffies(delay_ms);
1161+
if (delay_ms > 1000)
1162+
*delay_jiffies = round_jiffies(*delay_jiffies);
1163+
}
1164+
11581165
/**
11591166
* thermal_zone_device_register() - register a new thermal zone device
11601167
* @type: the thermal zone device type

drivers/thermal/thermal_core.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ int thermal_build_list_of_policies(char *buf);
112112

113113
/* Helpers */
114114
void thermal_zone_set_trips(struct thermal_zone_device *tz);
115-
void thermal_set_delay_jiffies(unsigned long *delay_jiffies, int delay_ms);
116115

117116
/* sysfs I/F */
118117
int thermal_zone_create_device_groups(struct thermal_zone_device *, int);

drivers/thermal/thermal_helpers.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,6 @@ void thermal_zone_set_trips(struct thermal_zone_device *tz)
174174
mutex_unlock(&tz->lock);
175175
}
176176

177-
void thermal_set_delay_jiffies(unsigned long *delay_jiffies, int delay_ms)
178-
{
179-
*delay_jiffies = msecs_to_jiffies(delay_ms);
180-
if (delay_ms > 1000)
181-
*delay_jiffies = round_jiffies(*delay_jiffies);
182-
}
183-
184177
static void thermal_cdev_set_cur_state(struct thermal_cooling_device *cdev,
185178
int target)
186179
{

0 commit comments

Comments
 (0)