thermal: sysfs: serialize access to instances

Because instances are the result of a matching
between cdev and tz, we need to lock both
in order to access the instance reliably.

This patch locks both tz and cdev in user
facing sysfs handlers when accessing thermal
zone instance.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
1 file changed