diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-09-21 13:54:02 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-10-19 08:27:33 +0100 |
commit | 59fcc6af89ff2069436830be02ebfde76d79d2d8 (patch) | |
tree | 8e0affae937ba546f359e5bb073a70dc838d859d /tools/perf/scripts/python/export-to-postgresql.py | |
parent | af8b93e27fb6cc74c0cf1e9b70ba01e85586d793 (diff) |
iio: adc: max1027: Prevent single channel accesses during buffer reads
When hardware buffers are enabled (the cnvst pin being the trigger), one
should not mess with the device state by requesting a single channel
read.
There is already a iio_buffer_enabled() check in *_read_single_value()
to merely prevent this situation but the check is inconsistent since
buffers can be enabled after the if clause anyway. Instead, use the core
mutex by calling iio_device_claim/release_direct_mode().
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20210921115408.66711-11-miquel.raynal@bootlin.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions