]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: power_allocator: don't require tzp to be present for the thermal zone
authorJavi Merino <javi.merino@arm.com>
Mon, 14 Sep 2015 13:23:53 +0000 (14:23 +0100)
committerEduardo Valentin <edubezval@gmail.com>
Mon, 14 Sep 2015 14:43:15 +0000 (07:43 -0700)
commitb3e5e5a605326362bcf3588d3f73354e50514d67
treee33fc9efce7e776c23fcd685d9a3942d182c5c65
parent4a3bf2284881ea99a4972fad22081b22df08cbdb
thermal: power_allocator: don't require tzp to be present for the thermal zone

Thermal zones created using thermal_zone_device_create() may not have
tzp.  As the governor gets its parameters from there, allocate it while
the governor is bound to the thermal zone so that it can operate in it.
In this case, tzp is freed when the thermal zone switches to another
governor.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/power_allocator.c