diff options
author | Aishwarya Pant <aishpant@gmail.com> | 2017-03-18 03:13:56 +0530 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-03-19 10:18:34 +0000 |
commit | 099c4cef24a6cb77e2c03e9e66199d460ed4a5a1 (patch) | |
tree | 42af5f2498d5c1cf7becd7b8a91c872eff350ece /drivers/staging/iio/accel | |
parent | 2e2c8d227ac9bc31a7df7401a6508dd73c25a2b6 (diff) | |
download | linux-099c4cef24a6cb77e2c03e9e66199d460ed4a5a1.tar.gz linux-099c4cef24a6cb77e2c03e9e66199d460ed4a5a1.tar.bz2 linux-099c4cef24a6cb77e2c03e9e66199d460ed4a5a1.zip |
staging: iio: accel: adis16201: remove iio_dev mlock
In the driver adis16201 read raw does not require an iio_dev->mlock for
reads. It can run concurrently as adis_read_reg_16() is protected by a
transaction lock.
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio/accel')
-rw-r--r-- | drivers/staging/iio/accel/adis16201.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/iio/accel/adis16201.c b/drivers/staging/iio/accel/adis16201.c index 75652681eaa7..fbc240663621 100644 --- a/drivers/staging/iio/accel/adis16201.c +++ b/drivers/staging/iio/accel/adis16201.c @@ -223,17 +223,13 @@ static int adis16201_read_raw(struct iio_dev *indio_dev, default: return -EINVAL; } - mutex_lock(&indio_dev->mlock); addr = adis16201_addresses[chan->scan_index]; ret = adis_read_reg_16(st, addr, &val16); - if (ret) { - mutex_unlock(&indio_dev->mlock); + if (ret) return ret; - } val16 &= (1 << bits) - 1; val16 = (s16)(val16 << (16 - bits)) >> (16 - bits); *val = val16; - mutex_unlock(&indio_dev->mlock); return IIO_VAL_INT; } return -EINVAL; |