]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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:43:38 +0000 (06:43 -0700)
commit8f52f33185ff13e76da8b1617ab0a82c495fcba8
tree0207792eaaa43f56fe049cc940066055282c8624
parent1b98d51db5865b569b5857e8fdc6f4cde4d6f334
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