linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: gyro: adis16260: remove indio_dev mlock
@ 2019-09-19 11:57 Alexandru Ardelean
  2019-10-05 14:38 ` Jonathan Cameron
  2019-10-08  8:22 ` [PATCH v2] iio: gyro: adis16260: replace mlock with ADIS lib's state_lock Alexandru Ardelean
  0 siblings, 2 replies; 6+ messages in thread
From: Alexandru Ardelean @ 2019-09-19 11:57 UTC (permalink / raw)
  To: linux-iio; +Cc: Alexandru Ardelean

The internal lock that is by the ADIS library should be sufficient to keep
state consistent. There is no need for an extra lock.

This patch removes it.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
 drivers/iio/gyro/adis16260.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/iio/gyro/adis16260.c b/drivers/iio/gyro/adis16260.c
index 207a0ce13439..0fa93d02062a 100644
--- a/drivers/iio/gyro/adis16260.c
+++ b/drivers/iio/gyro/adis16260.c
@@ -293,7 +293,6 @@ static int adis16260_write_raw(struct iio_dev *indio_dev,
 		addr = adis16260_addresses[chan->scan_index][1];
 		return adis_write_reg_16(adis, addr, val);
 	case IIO_CHAN_INFO_SAMP_FREQ:
-		mutex_lock(&indio_dev->mlock);
 		if (spi_get_device_id(adis->spi)->driver_data)
 			t = 256 / val;
 		else
@@ -310,7 +309,6 @@ static int adis16260_write_raw(struct iio_dev *indio_dev,
 			adis->spi->max_speed_hz = ADIS16260_SPI_FAST;
 		ret = adis_write_reg_8(adis, ADIS16260_SMPL_PRD, t);
 
-		mutex_unlock(&indio_dev->mlock);
 		return ret;
 	}
 	return -EINVAL;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-10-12 13:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-19 11:57 [PATCH] iio: gyro: adis16260: remove indio_dev mlock Alexandru Ardelean
2019-10-05 14:38 ` Jonathan Cameron
2019-10-05 14:49   ` Jonathan Cameron
2019-10-07  7:56     ` Ardelean, Alexandru
2019-10-08  8:22 ` [PATCH v2] iio: gyro: adis16260: replace mlock with ADIS lib's state_lock Alexandru Ardelean
2019-10-12 13:43   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).