Skip to content

Commit a44b5e3

Browse files
committed
thermal: core: Eliminate thermal_zone_trip_down()
Since thermal_zone_set_trip_temp() is now located in the same file as thermal_trip_crossed(), it can invoke the latter directly without using the thermal_zone_trip_down() wrapper that has no other users. Update thermal_zone_set_trip_temp() accordingly and drop thermal_zone_trip_down(). No functional impact. Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Lukasz Luba <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent e654a0c commit a44b5e3

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

drivers/thermal/thermal_core.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ void thermal_zone_set_trip_temp(struct thermal_zone_device *tz,
565565
* are needed to compensate for the lack of it going forward.
566566
*/
567567
if (tz->temperature >= td->threshold)
568-
thermal_zone_trip_down(tz, td);
568+
thermal_trip_crossed(tz, td, thermal_get_tz_governor(tz), false);
569569

570570
/*
571571
* Invalidate the threshold to avoid triggering a spurious
@@ -699,12 +699,6 @@ void thermal_zone_device_update(struct thermal_zone_device *tz,
699699
}
700700
EXPORT_SYMBOL_GPL(thermal_zone_device_update);
701701

702-
void thermal_zone_trip_down(struct thermal_zone_device *tz,
703-
struct thermal_trip_desc *td)
704-
{
705-
thermal_trip_crossed(tz, td, thermal_get_tz_governor(tz), false);
706-
}
707-
708702
int for_each_thermal_governor(int (*cb)(struct thermal_governor *, void *),
709703
void *data)
710704
{

drivers/thermal/thermal_core.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,6 @@ void thermal_zone_set_trips(struct thermal_zone_device *tz, int low, int high);
273273
int thermal_zone_trip_id(const struct thermal_zone_device *tz,
274274
const struct thermal_trip *trip);
275275
int __thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp);
276-
void thermal_zone_trip_down(struct thermal_zone_device *tz,
277-
struct thermal_trip_desc *td);
278276
void thermal_zone_set_trip_hyst(struct thermal_zone_device *tz,
279277
struct thermal_trip *trip, int hyst);
280278

0 commit comments

Comments
 (0)