]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: adc: ad_sigma_delta: change to buffer predisable
authorDavid Lechner <dlechner@baylibre.com>
Thu, 3 Jul 2025 21:07:44 +0000 (16:07 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:35 +0000 (16:28 +0200)
commit296bcff76d4143b72853626beca62fb2d84d3280
treed48c15ea53f39d7c2079748bd6b2223dfa50ac28
parent50e823a23816b792daf6e8405f8d6045952bb90e
iio: adc: ad_sigma_delta: change to buffer predisable

commit 66d4374d97f85516b5a22418c5e798aed2606dec upstream.

Change the buffer disable callback from postdisable to predisable.
This balances the existing posteanble callback. Using postdisable
with posteanble can be problematic, for example, if update_scan_mode
fails, it would call postdisable without ever having called posteanble,
so the drivers using this would be in an unexpected state when
postdisable was called.

Fixes: af3008485ea0 ("iio:adc: Add common code for ADI Sigma Delta devices")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://patch.msgid.link/20250703-iio-adc-ad_sigma_delta-buffer-predisable-v1-1-f2ab85138f1f@baylibre.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/ad_sigma_delta.c