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)
commit1b7e9e2cbd6478e0ebe40639ea36fefd3ffcf916
treeee178b261cadee71342032c9fb5f5fd0269b9a6a
parentf375a49f710535b0ac2923274e2a33f04e02514d
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