dma: ste_dma40: Maintain spinlock order while handling pause
authorUlf Hansson <ulf.hansson@linaro.org>
Wed, 23 Apr 2014 19:52:01 +0000 (21:52 +0200)
committerVinod Koul <vinod.koul@intel.com>
Wed, 7 May 2014 06:20:27 +0000 (11:50 +0530)
The runtime PM resume callback needs to be executed while holding the
spinlock, make sure to maintain this for the pause operation as well.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/ste_dma40.c

index bf18c786ed40fbaae2a487246df5da85457fbec1..6e97cf6931f1bd29b6adb16e852030c110eba8ed 100644 (file)
@@ -1495,8 +1495,8 @@ static int d40_pause(struct d40_chan *d40c)
        if (!d40c->busy)
                return 0;
 
-       pm_runtime_get_sync(d40c->base->dev);
        spin_lock_irqsave(&d40c->lock, flags);
+       pm_runtime_get_sync(d40c->base->dev);
 
        res = d40_channel_execute_command(d40c, D40_DMA_SUSPEND_REQ);