Thermal: thermal zone governor fix
authorZhang Rui <rui.zhang@intel.com>
Fri, 24 Jan 2014 02:23:19 +0000 (10:23 +0800)
committerAlex Shi <alex.shi@linaro.org>
Thu, 25 Sep 2014 09:05:23 +0000 (17:05 +0800)
commitfe174a059c03451611cbefa828f6efc76fc5ac78
treed666a575f75c13b5c6d88f1ebe79e389fb801ac4
parent25a434675eaa351f90b51866a982accac5ee6c61
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.

This also fixes a problem that OF registered thermal zones
are running with no governor.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Javi Merino <javi.merino@arm.com>
(cherry picked from commit f2234bcd03ad031225d7dc37dd18852a2f2ff2bf)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
drivers/thermal/thermal_core.c