Message ID | 20200430063229.6182-4-rui.zhang@intel.com (mailing list archive) |
---|---|
State | Changes Requested, archived |
Delegated to: | Zhang Rui |
Headers | show |
Series | thermal: improve handling of disabled thermal zone | expand |
On 4/30/20 8:32 AM, Zhang Rui wrote: > Move monitor_thermal_zone() from handle_thermal_trip() to > thermal_zone_device_update() because updating the polling timers after all > trips handled is sufficient. > > Signed-off-by: Zhang Rui <rui.zhang@intel.com> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics > --- > drivers/thermal/thermal_core.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c > index ac70545..04a16a9 100644 > --- a/drivers/thermal/thermal_core.c > +++ b/drivers/thermal/thermal_core.c > @@ -430,11 +430,6 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip) > handle_critical_trips(tz, trip, type); > else > handle_non_critical_trips(tz, trip); > - /* > - * Alright, we handled this trip successfully. > - * So, start monitoring again. > - */ > - monitor_thermal_zone(tz); > } > > static void update_temperature(struct thermal_zone_device *tz) > @@ -529,6 +524,12 @@ void thermal_zone_device_update(struct thermal_zone_device *tz, > > for (count = 0; count < tz->trips; count++) > handle_thermal_trip(tz, count); > + > + /* > + * Alright, we handled all the trips successfully. > + * So, start monitoring again. > + */ > + monitor_thermal_zone(tz); > } > EXPORT_SYMBOL_GPL(thermal_zone_device_update); >
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index ac70545..04a16a9 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -430,11 +430,6 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip) handle_critical_trips(tz, trip, type); else handle_non_critical_trips(tz, trip); - /* - * Alright, we handled this trip successfully. - * So, start monitoring again. - */ - monitor_thermal_zone(tz); } static void update_temperature(struct thermal_zone_device *tz) @@ -529,6 +524,12 @@ void thermal_zone_device_update(struct thermal_zone_device *tz, for (count = 0; count < tz->trips; count++) handle_thermal_trip(tz, count); + + /* + * Alright, we handled all the trips successfully. + * So, start monitoring again. + */ + monitor_thermal_zone(tz); } EXPORT_SYMBOL_GPL(thermal_zone_device_update);
Move monitor_thermal_zone() from handle_thermal_trip() to thermal_zone_device_update() because updating the polling timers after all trips handled is sufficient. Signed-off-by: Zhang Rui <rui.zhang@intel.com> --- drivers/thermal/thermal_core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)