Search Linux Wireless

Re: [PATCH 4/6] thermal: core: stop polling timer for disabled thermal zone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/30/20 8:32 AM, Zhang Rui wrote:
> For a disabled thermal zone, thermal_zone_device_update() should do
> nothing but cancelling the polling timer.
> 
> Signed-off-by: Zhang Rui <rui.zhang@xxxxxxxxx>

Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/thermal/thermal_core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> index 04a16a9..5f7a867 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -508,7 +508,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz,
>  	int count;
>  
>  	if (should_stop_polling(tz))
> -		return;
> +		goto update_polling;
>  
>  	if (atomic_read(&in_suspend))
>  		return;
> @@ -525,6 +525,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz,
>  	for (count = 0; count < tz->trips; count++)
>  		handle_thermal_trip(tz, count);
>  
> +update_polling:
>  	/*
>  	 * Alright, we handled all the trips successfully.
>  	 * So, start monitoring again.
> 




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux