Re: [PATCH v3] staging: ad7606: Replace mlock with driver private lock

2017-03-22 Thread Jonathan Cameron
On 20/03/17 19:51, Arushi Singhal wrote: > 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

[PATCH v3] staging: ad7606: Replace mlock with driver private lock

2017-03-20 Thread Arushi Singhal
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. Replace it with a lock in the devices

Re: [PATCH v3] staging: ad7606: Replace mlock with driver private lock

2017-03-20 Thread Lars-Peter Clausen
On 03/20/2017 07:56 PM, Arushi Singhal wrote: [...] > @@ -413,6 +413,7 @@ int ad7606_probe(struct device *dev, int irq, void > __iomem *base_address, > st = iio_priv(indio_dev); > > st->dev = dev; > + mutex_init(>lock); This is nitpicking, but putting this in the middle of the

[PATCH v3] staging: ad7606: Replace mlock with driver private lock

2017-03-20 Thread Arushi Singhal
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. Replace it with a lock in the devices