mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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>
This commit is contained in:
parent
bc0e734516
commit
b1d6ab1aa8
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user