]> git.karo-electronics.de Git - linux-beck.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)
commitf4a821ce6ed41970d0155f55067fb07009974fbe
tree6cceeaa90060fb17985fbe7f9b5aa9466cf03d8d
parent908b9fb792b77663a007af240e7ee89460de2025
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