WSL2-Linux-Kernel/drivers/iio/addac
William Breathitt Gray 9fa82f031a iio: addac: stx104: Fix race condition when converting analog-to-digital
[ Upstream commit 4f9b80aefb ]

The ADC conversion procedure requires several device I/O operations
performed in a particular sequence. If stx104_read_raw() is called
concurrently, the ADC conversion procedure could be clobbered. Prevent
such a race condition by utilizing a mutex.

Fixes: 4075a283ae ("iio: stx104: Add IIO support for the ADC channels")
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/2ae5e40eed5006ca735e4c12181a9ff5ced65547.1680790580.git.william.gray@linaro.org
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-26 14:23:27 +02:00
..
Kconfig
Makefile
stx104.c iio: addac: stx104: Fix race condition when converting analog-to-digital 2023-08-26 14:23:27 +02:00