]> git.baikalelectronics.ru Git - kernel.git/commit
iio: gyro: adis16080: replace mlock with own lock
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Thu, 19 Sep 2019 13:23:03 +0000 (16:23 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 5 Oct 2019 14:54:58 +0000 (15:54 +0100)
commite0db816bfd80e45ad0f9057d5dfe7fa67c4bd81b
tree1c6addabd93aeb8ea214d81f07b8ae7901edca9b
parentfab51eb08fc7bc0bee972b17d9d28c10e3464971
iio: gyro: adis16080: replace mlock with own lock

The lock is used to protect the buffer during reads. Though the spi
routines have their own locks, it may be the case that the buffer needs to
be protected before it's stored and passed to the IIO read hooks.

indio_dev's mlock was used before.
This change replaces it with the driver's own lock.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/gyro/adis16080.c