aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2012-01-31 05:49:00 -0500
committerVinod Koul <vinod.koul@linux.intel.com>2012-02-22 07:41:48 -0500
commit91c1c9e36d9450974c9f04cf961d0b45aafca507 (patch)
tree9834e5a9c0b2096766cd31440333c8678b254b0d
parent7f99a4216d68f6d75d5d544aa265d72f193bad7f (diff)
dmaengine: intel_mid_dma: move pm_runtime_put
Move pm_runtime_put() to the end of intel_mid_dma_free_chan_resources() because there is no sense in allowing runtime suspend while the driver is still accessing the device. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
-rw-r--r--drivers/dma/intel_mid_dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
index 512e2ab3febb..923476d74a5d 100644
--- a/drivers/dma/intel_mid_dma.c
+++ b/drivers/dma/intel_mid_dma.c
@@ -832,7 +832,6 @@ static void intel_mid_dma_free_chan_resources(struct dma_chan *chan)
832 /*trying to free ch in use!!!!!*/ 832 /*trying to free ch in use!!!!!*/
833 pr_err("ERR_MDMA: trying to free ch in use\n"); 833 pr_err("ERR_MDMA: trying to free ch in use\n");
834 } 834 }
835 pm_runtime_put(&mid->pdev->dev);
836 spin_lock_bh(&midc->lock); 835 spin_lock_bh(&midc->lock);
837 midc->descs_allocated = 0; 836 midc->descs_allocated = 0;
838 list_for_each_entry_safe(desc, _desc, &midc->active_list, desc_node) { 837 list_for_each_entry_safe(desc, _desc, &midc->active_list, desc_node) {
@@ -853,6 +852,7 @@ static void intel_mid_dma_free_chan_resources(struct dma_chan *chan)
853 /* Disable CH interrupts */ 852 /* Disable CH interrupts */
854 iowrite32(MASK_INTR_REG(midc->ch_id), mid->dma_base + MASK_BLOCK); 853 iowrite32(MASK_INTR_REG(midc->ch_id), mid->dma_base + MASK_BLOCK);
855 iowrite32(MASK_INTR_REG(midc->ch_id), mid->dma_base + MASK_ERR); 854 iowrite32(MASK_INTR_REG(midc->ch_id), mid->dma_base + MASK_ERR);
855 pm_runtime_put(&mid->pdev->dev);
856} 856}
857 857
858/** 858/**