]> 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)
commitd84d784fda45a930b8e599afa7844aad6f43b7f2
tree6cceeaa90060fb17985fbe7f9b5aa9466cf03d8d
parent9b0bdabd098ea3e62101c103e8ad9e3c8b1c050b
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