From: Alexandru Ardelean Date: Tue, 17 Sep 2019 16:10:23 +0000 (+0300) Subject: iio: gyro: adis16130: remove mlock usage X-Git-Tag: v5.5-rc1~135^2~250^2~11 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ea14163d29130649e43bfcad12ef6ef9a956fbe3;p=users%2Fdwmw2%2Flinux.git iio: gyro: adis16130: remove mlock usage The use of indio_dev's mlock is discouraged. The driver already defines it's own `bus_lock` in `adis16130_spi_read()`, so using the mlock is redundant. The parts supported by this chip are obsoleted anyway, so for now we just remove mlock as part of a general cleanup, until the driver gets removed. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/gyro/adis16130.c b/drivers/iio/gyro/adis16130.c index de3f66f89496c..79e63c8a2ea87 100644 --- a/drivers/iio/gyro/adis16130.c +++ b/drivers/iio/gyro/adis16130.c @@ -76,9 +76,7 @@ static int adis16130_read_raw(struct iio_dev *indio_dev, switch (mask) { case IIO_CHAN_INFO_RAW: /* Take the iio_dev status lock */ - mutex_lock(&indio_dev->mlock); ret = adis16130_spi_read(indio_dev, chan->address, &temp); - mutex_unlock(&indio_dev->mlock); if (ret) return ret; *val = temp;