iio: adc: ti-ads7950: Fix improper use of mlock
authorJustin Chen <justinpopo6@gmail.com>
Thu, 28 Feb 2019 22:16:48 +0000 (14:16 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:46:25 +0000 (06:46 -0700)
commitef8e5a78406d103ac546a7a50cb02f05fec7987f
treedca9f0741480d238cb51aa7cb026ccdd69c49732
parent36a59a036896eab864e8370406a24189593078df
iio: adc: ti-ads7950: Fix improper use of mlock

[ Upstream commit abbde2792999c9ad3514dd25d7f8d9a96034fe16 ]

Indio->mlock is used for protecting the different iio device modes.
It is currently not being used in this way. Replace the lock with
an internal lock specifically used for protecting the SPI transfer
buffer.

Signed-off-by: Justin Chen <justinpopo6@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/adc/ti-ads7950.c