]> git.baikalelectronics.ru Git - kernel.git/commit
Thermal: Introduce locking for cdev.thermal_instances list.
authorZhang Rui <rui.zhang@intel.com>
Tue, 24 Jul 2012 08:56:21 +0000 (16:56 +0800)
committerZhang Rui <rui.zhang@intel.com>
Mon, 24 Sep 2012 06:44:37 +0000 (14:44 +0800)
commit2cd38bc169fc8dae3c3513e03d91c1416e24c4a4
tree6cceeaa90060fb17985fbe7f9b5aa9466cf03d8d
parent45121cc324725c895a689b5fc21b6726111ad325
Thermal: Introduce locking for cdev.thermal_instances list.

we need to go over all the thermal_instance list of a cooling device
to decide which cooling state to put the cooling device to.

But at this time, as a cooling device may be referenced in multiple
thermal zones, we need to lock the list first in case
another thermal zone is updating this cooling device.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Eduardo Valentin <eduardo.valentin@ti.com>
drivers/thermal/thermal_sys.c
include/linux/thermal.h