diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-11-23 11:06:43 +0100 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-12-05 13:43:30 +0530 |
commit | b1d6ab1aa8cdc23b89bcd578ea8d5e3c501a13d9 (patch) | |
tree | 645ae3fcc36cdfa89b790c3440e987db7c04bae0 | |
parent | bc0e7345168c0f7483d2d1da86285d89136417cd (diff) | |
download | linux-stable-b1d6ab1aa8cdc23b89bcd578ea8d5e3c501a13d9.tar.gz linux-stable-b1d6ab1aa8cdc23b89bcd578ea8d5e3c501a13d9.tar.bz2 linux-stable-b1d6ab1aa8cdc23b89bcd578ea8d5e3c501a13d9.zip |
dmaengine: Add might_sleep() to dmaengine_synchronize()
Implementations of dmaengine_synchronize() are allowed to sleep, hence the
function must not be called to from atomic context. Add might_sleep() to
dmaengine_synchronize() to make it easier to detect non-compliant callers.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | include/linux/dmaengine.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 4662d9aa6d5a..2f69e1d93f92 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -895,6 +895,8 @@ static inline int dmaengine_terminate_async(struct dma_chan *chan) */ static inline void dmaengine_synchronize(struct dma_chan *chan) { + might_sleep(); + if (chan->device->device_synchronize) chan->device->device_synchronize(chan); } |