]> git.karo-electronics.de Git - karo-tx-linux.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>
Thu, 9 Aug 2012 01:11:09 +0000 (09:11 +0800)
commitef234eec59f9fc50724271c9ee9c858b1de0eb77
tree6cceeaa90060fb17985fbe7f9b5aa9466cf03d8d
parent9d99363e593c4ac9a49aeb13d30fccb9ff199b92
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.

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