Skip to content

Commit 91c1c9e

Browse files
ahunter6Vinod Koul
authored andcommitted
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>
1 parent 7f99a42 commit 91c1c9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma/intel_mid_dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,6 @@ static void intel_mid_dma_free_chan_resources(struct dma_chan *chan)
832832
/*trying to free ch in use!!!!!*/
833833
pr_err("ERR_MDMA: trying to free ch in use\n");
834834
}
835-
pm_runtime_put(&mid->pdev->dev);
836835
spin_lock_bh(&midc->lock);
837836
midc->descs_allocated = 0;
838837
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)
853852
/* Disable CH interrupts */
854853
iowrite32(MASK_INTR_REG(midc->ch_id), mid->dma_base + MASK_BLOCK);
855854
iowrite32(MASK_INTR_REG(midc->ch_id), mid->dma_base + MASK_ERR);
855+
pm_runtime_put(&mid->pdev->dev);
856856
}
857857

858858
/**

0 commit comments

Comments
 (0)