]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: ad7768-1: remove unnecessary locking
authorJonathan Santos <Jonathan.Santos@analog.com>
Thu, 6 Mar 2025 21:01:51 +0000 (18:01 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 11 Mar 2025 19:09:16 +0000 (19:09 +0000)
commit809d605d138032d63013838cf28188414d842919
tree4af4e60ddb5cd41df38dc27215d71c1eaed0a24b
parent20182142045fc44ffd883e266d9497396cc0115c
iio: adc: ad7768-1: remove unnecessary locking

The current locking is only preventing a triggered buffer Transfer and a
debugfs register access from happening at the same time. If a register
access happens during a buffered read, the action is doomed to fail anyway,
since we need to write a magic value to exit continuous read mode.

Remove locking from the trigger handler and use
iio_device_claim_direct() instead in the register access function.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com>
Link: https://patch.msgid.link/d0450b7c5d8467e54913ef905f6147baa2b866b3.1741268122.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7768-1.c