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 <[email protected]>
Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
*/
static inline void dmaengine_synchronize(struct dma_chan *chan)
{
+ might_sleep();
+
if (chan->device->device_synchronize)
chan->device->device_synchronize(chan);
}