]> git.baikalelectronics.ru Git - kernel.git/commit
iio: adc: fsl-imx25-gcq: Replace indio_dev->mlock with own device lock
authorSergiu Cuciurean <sergiu.cuciurean@analog.com>
Wed, 16 Sep 2020 09:29:28 +0000 (12:29 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 21 Sep 2020 17:41:35 +0000 (18:41 +0100)
commit99d3bb07db8fa48ada89737c61721ae7fc47def4
treeab53fd143e9b984061e4013163c94d58c2be0988
parente05916f231193b1a10c7c42c8c3a533a6043817c
iio: adc: fsl-imx25-gcq: Replace indio_dev->mlock with own device lock

As part of the general cleanup of indio_dev->mlock, this change replaces
it with a local lock, to protect against any other accesses during the
reading of sample. Reading a sample requires multiple consecutive regmap
operations and a completion callback, so this requires that no other
read occurs until it completes.

This is part of a bigger cleanup.
Link: https://lore.kernel.org/linux-iio/CA+U=Dsoo6YABe5ODLp+eFNPGFDjk5ZeQEceGkqjxXcVEhLWubw@mail.gmail.com/
Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@analog.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20200916092928.78026-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/fsl-imx25-gcq.c