iio: adc: stm32-adc: fix sleep in atomic context
authorOlivier Moysan <olivier.moysan@st.com>
Mon, 9 Mar 2020 10:02:12 +0000 (11:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2020 14:33:12 +0000 (16:33 +0200)
commitdb168069b0d661f005e053fad94af1d5eac1dead
tree419fa9b00270fde845cc3f59ab9fc4a45b66a9d1
parent02311bc133440a0b333c6bb51dc669be3d72972c
iio: adc: stm32-adc: fix sleep in atomic context

commit e2042d2936dfc84e9c600fe9b9d0039ca0e54b7d upstream.

This commit fixes the following error:
"BUG: sleeping function called from invalid context at kernel/irq/chip.c"

In DMA mode suppress the trigger irq handler, and make the buffer
transfers directly in DMA callback, instead.

Fixes: 2763ea0585c9 ("iio: adc: stm32: add optional dma support")
Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.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/stm32-adc.c