]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: iio: ad7192: Fix - use the dedicated reset function avoiding dma from stack.
authorStefan Popa <stefan.popa@analog.com>
Thu, 14 Sep 2017 13:50:28 +0000 (16:50 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2017 07:18:02 +0000 (09:18 +0200)
commit923f18a8aacdf4b23a452360346755b7cf21c252
treee5c81ca69b75bc988d0812db5d0f5c9be85239ef
parent440edb76708ff2eefe035c9f3f9457b3b8a93dd6
staging: iio: ad7192: Fix - use the dedicated reset function avoiding dma from stack.

commit f790923f146140a261ad211e5baf75d169f16fb2 upstream.

Depends on: 691c4b95d1 ("iio: ad_sigma_delta: Implement a dedicated reset function")

SPI host drivers can use DMA to transfer data, so the buffer should be properly allocated.
Keeping it on the stack could cause an undefined behavior.

The dedicated reset function solves this issue.

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/adc/ad7192.c