]> git.baikalelectronics.ru Git - kernel.git/commit
staging: iio: tsl2583: add locking to sysfs attributes
authorBrian Masney <masneyb@onstation.org>
Fri, 28 Oct 2016 10:00:21 +0000 (06:00 -0400)
committerJonathan Cameron <jic23@kernel.org>
Tue, 1 Nov 2016 18:50:09 +0000 (18:50 +0000)
commit2ff5e848522b782b12e31bf950eb94cca5df19d1
treeee178b261cadee71342032c9fb5f5fd0269b9a6a
parentf100c936d0e7d910f58f75f38b7b7354a55c928f
staging: iio: tsl2583: add locking to sysfs attributes

in_illuminance_input_target_show(), in_illuminance_input_target_store(),
in_illuminance_calibrate_store(), and in_illuminance_lux_table_store()
accesses data from the tsl2583_chip struct. Some of these fields can be
modified by other parts of the driver concurrently. This patch adds the
mutex locking to these sysfs attributes.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/tsl2583.c