]> git.baikalelectronics.ru Git - kernel.git/commit
staging: iio: update locking method during frequency writes
authorGargi Sharma <gs051095@gmail.com>
Thu, 30 Mar 2017 09:33:46 +0000 (15:03 +0530)
committerJonathan Cameron <jic23@kernel.org>
Thu, 30 Mar 2017 18:20:38 +0000 (19:20 +0100)
commita8ee355333ecf9e6bb89a90b9f733d43ab1cf193
treef20f84ab971ae91c70005174d18da7a90a66a31e
parente1818f9ff88b9fdbf6f1b2f2915380092f069e46
staging: iio: update locking method during frequency writes

The driver needs to insure atomicity during frequency
changes of bus and device. The iiodev->mlock as used
was not doing that. Replace it with the drivers existing
buffer lock and introduce an auxiliary spi_write() that does
not hold the lock.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/meter/ade7754.c