Re: [PATCH] Thermal: thermal zone governor fix

Javi Merino
2014-03-03T10:00:43Z

Hi Rui,

On Mon, Mar 03, 2014 at 05:46:13AM +0000, Zhang Rui wrote:
> From 635a1f41a8f95a35d1bf24c9cc018ffb018a93e6 Mon Sep 17 00:00:00 2001
> From: Zhang Rui <rui.zhang@intel.com>
> Date: Fri, 24 Jan 2014 10:23:19 +0800
> Subject: [PATCH] Thermal: thermal zone governor fix
>
> This patch does a cleanup about the thermal zone govenor,
> setting and make the following rule.
> 1. For thermal zone devices that are registered w/o tz->tzp,
> they can use the default thermal governor only.
> 2. For thermal zone devices w/ governor name specified in
> tz->tzp->governor_name, we will use the default govenor
> if the governor specified is not available at the moment,
> and update tz->governor when the matched governor is registered.
>
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>

This solves my issue. You can add my Acked-by.

I was a bit worried about dereferencing def_governor in
handle_non_critical_trips() without checking if it's initialised. I
guess that all the thermal zones initialise in device_initcall or
later so by the time they run thermal_zone_device_update(),
thermal_register_governors() must have initialised the default
governor. So it's not an issue.

Thanks,
Javi