iio: adc: ad9467: add mutex to struct ad9467_state
authorNuno Sa <nuno.sa@analog.com>
Thu, 7 Dec 2023 12:39:26 +0000 (13:39 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 10 Dec 2023 11:41:00 +0000 (11:41 +0000)
commit737720197be445bb9eec2986101e4a386e019337
tree1d9e084e2f55382891d457e5ab13b41537ffcc2a
parente072e149cfb827e0ab4cafb0547e9658e35393cd
iio: adc: ad9467: add mutex to struct ad9467_state

When calling ad9467_set_scale(), multiple calls to ad9467_spi_write()
are done which means we need to properly protect the whole operation so
we are sure we will be in a sane state if two concurrent calls occur.

Fixes: ad6797120238 ("iio: adc: ad9467: add support AD9467 ADC")
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-3-a4a33bc4d70e@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad9467.c