diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-04-24 23:15:48 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-04-24 23:15:48 +0200 |
commit | 0df283639d7f6aa8948516aabf0c48b4b486cda1 (patch) | |
tree | 241c67ce212acd91a8cdeb22cced135e7f5e275e /arch/arm/plat-omap/dma.c | |
parent | Merge branch 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze (diff) | |
parent | Merge branch 'omap-clock-fixes' into omap-fixes (diff) | |
download | linux-0df283639d7f6aa8948516aabf0c48b4b486cda1.tar.xz linux-0df283639d7f6aa8948516aabf0c48b4b486cda1.zip |
Merge branch 'omap-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
Diffstat (limited to 'arch/arm/plat-omap/dma.c')
-rw-r--r-- | arch/arm/plat-omap/dma.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 21cc0142b97a..7fc8c045ad5d 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -760,19 +760,12 @@ void omap_free_dma(int lch) { unsigned long flags; - spin_lock_irqsave(&dma_chan_lock, flags); if (dma_chan[lch].dev_id == -1) { pr_err("omap_dma: trying to free unallocated DMA channel %d\n", lch); - spin_unlock_irqrestore(&dma_chan_lock, flags); return; } - dma_chan[lch].dev_id = -1; - dma_chan[lch].next_lch = -1; - dma_chan[lch].callback = NULL; - spin_unlock_irqrestore(&dma_chan_lock, flags); - if (cpu_class_is_omap1()) { /* Disable all DMA interrupts for the channel. */ dma_write(0, CICR(lch)); @@ -798,6 +791,12 @@ void omap_free_dma(int lch) dma_write(0, CCR(lch)); omap_clear_dma(lch); } + + spin_lock_irqsave(&dma_chan_lock, flags); + dma_chan[lch].dev_id = -1; + dma_chan[lch].next_lch = -1; + dma_chan[lch].callback = NULL; + spin_unlock_irqrestore(&dma_chan_lock, flags); } EXPORT_SYMBOL(omap_free_dma); |