summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/cdc/ad7746.c
diff options
context:
space:
mode:
authorsimran singhal <singhalsimran0@gmail.com>2017-03-22 21:50:43 +0530
committerJonathan Cameron <jic23@kernel.org>2017-03-23 19:43:03 +0000
commit9dde479e9f9e5b2eafa3db8b7ce919b74533beb8 (patch)
treea8b2f6ccaad4fca57035c6c604d65c67186e1a6c /drivers/staging/iio/cdc/ad7746.c
parentc831c583f8d93185928096b6f3e4735c013f1969 (diff)
downloadop-kernel-dev-9dde479e9f9e5b2eafa3db8b7ce919b74533beb8.zip
op-kernel-dev-9dde479e9f9e5b2eafa3db8b7ce919b74533beb8.tar.gz
staging: iio: adis16060: Remove iio_dev mlock and refactor code
The IIO subsystem is redefining iio_dev->mlock to be used by the IIO core only for protecting device operating mode changes. ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. In this driver, mlock was being used to protect hardware state changes. In the driver, buf_lock protects both the adis16060_spi_write() and adis16060_spi_read() functions and both are always called in pair. First write, then read. Refactor the code to have one single function adis16060_spi_write_than_read() protected by the buf_lock. This removes the need for additional locking via mlock, so this locking is removed. Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio/cdc/ad7746.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud