Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1d6ab1a authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Vinod Koul
Browse files

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: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent bc0e7345
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
}