diff options
author | Gargi Sharma <gs051095@gmail.com> | 2017-03-20 14:00:42 +0530 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-03-23 19:43:36 +0000 |
commit | 66893ea3757ceb2a95b57ac0fec6632003155f5b (patch) | |
tree | 9a798bc47dd0c43f36b2d8f3b1cbee433400e558 | |
parent | 745c6dad490d9ec99f2f1cc3ec4b38afa4f5a8ed (diff) |
staging: adis16203: Remove locking on raw reads of IIO_CHAN_INFO_CALIBBIAS
adis16203_read_raw does not need lock for IIO_CHAN_INFO_CALIBBIAS
since adis_read_reg_16 is already atomic and nothing else needs to be
protected.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/staging/iio/accel/adis16203.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/staging/iio/accel/adis16203.c b/drivers/staging/iio/accel/adis16203.c index b59755aedd8b..faa2869b5431 100644 --- a/drivers/staging/iio/accel/adis16203.c +++ b/drivers/staging/iio/accel/adis16203.c @@ -203,17 +203,14 @@ static int adis16203_read_raw(struct iio_dev *indio_dev, return IIO_VAL_INT; case IIO_CHAN_INFO_CALIBBIAS: bits = 14; - mutex_lock(&indio_dev->mlock); addr = adis16203_addresses[chan->scan_index]; ret = adis_read_reg_16(st, addr, &val16); if (ret) { - mutex_unlock(&indio_dev->mlock); return ret; } val16 &= (1 << bits) - 1; val16 = (s16)(val16 << (16 - bits)) >> (16 - bits); *val = val16; - mutex_unlock(&indio_dev->mlock); return IIO_VAL_INT; default: return -EINVAL; |