OSDN Git Service

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)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 28 Mar 2020 16:35:00 +0000 (16:35 +0000)
commite2042d2936dfc84e9c600fe9b9d0039ca0e54b7d
treed284b4bb5eaa999c088769ba62bd7cc1ccb27a6d
parent28535877ac5b2b84f0d394fd67a5ec71c0c48b10
iio: adc: stm32-adc: fix sleep in atomic context

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>
drivers/iio/adc/stm32-adc.c