]> git.baikalelectronics.ru Git - kernel.git/commit
iio: ad799x: Fix buffered capture for ad7991/ad7995/ad7999
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 11 Jul 2016 11:54:17 +0000 (13:54 +0200)
committerJonathan Cameron <jic23@kernel.org>
Mon, 15 Aug 2016 14:39:14 +0000 (15:39 +0100)
commitfd44ec588179bd8d4fad13409fc891ea8adb60f1
treec3523231990fc12c9bd2879febf1e67661a7bd30
parente4f63b58cc386ac8409ec7a6f14cebd9293dbf8d
iio: ad799x: Fix buffered capture for ad7991/ad7995/ad7999

The data buffer for captured mode for the ad799x driver is allocated in the
update_scan_mode() callback. This callback is not set in the iio_info
struct for the ad7791/ad7995/ad7999, which means that the data buffer is
not allocated when a captured transfer is started. As a result the driver
crashes when the first sample is received. To fix this properly set the
update_scan_mode() callback.

Fixes: 3baba056ecae ("staging:iio:ad799x: Preallocate sample buffer")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/ad799x.c