aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2008-12-18 04:01:49 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2008-12-18 10:40:04 -0500
commit7c99502383713f1a59c35fbe14db8364e4052286 (patch)
treeb20700f2f3576b38264da3ed5cc76e842a2a7d7c
parentb71edbe9a0adcf174833d371b000c5e97317fec5 (diff)
[ARM] MX1/MX2 DMA: add missing local_irq_restore()
This patch adds a missing call to local_irq_restore() and fixes some compiler warnings about unused variables for MX1. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/plat-mxc/dma-mx1-mx2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/plat-mxc/dma-mx1-mx2.c b/arch/arm/plat-mxc/dma-mx1-mx2.c
index e1c2eb497fbc..2905ec758758 100644
--- a/arch/arm/plat-mxc/dma-mx1-mx2.c
+++ b/arch/arm/plat-mxc/dma-mx1-mx2.c
@@ -511,6 +511,7 @@ void imx_dma_disable(int channel)
511} 511}
512EXPORT_SYMBOL(imx_dma_disable); 512EXPORT_SYMBOL(imx_dma_disable);
513 513
514#ifdef CONFIG_ARCH_MX2
514static void imx_dma_watchdog(unsigned long chno) 515static void imx_dma_watchdog(unsigned long chno)
515{ 516{
516 struct imx_dma_channel *imxdma = &imx_dma_channels[chno]; 517 struct imx_dma_channel *imxdma = &imx_dma_channels[chno];
@@ -522,6 +523,7 @@ static void imx_dma_watchdog(unsigned long chno)
522 if (imxdma->err_handler) 523 if (imxdma->err_handler)
523 imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT); 524 imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT);
524} 525}
526#endif
525 527
526static irqreturn_t dma_err_handler(int irq, void *dev_id) 528static irqreturn_t dma_err_handler(int irq, void *dev_id)
527{ 529{
@@ -674,7 +676,7 @@ int imx_dma_request(int channel, const char *name)
674{ 676{
675 struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; 677 struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
676 unsigned long flags; 678 unsigned long flags;
677 int ret; 679 int ret = 0;
678 680
679 /* basic sanity checks */ 681 /* basic sanity checks */
680 if (!name) 682 if (!name)
@@ -696,6 +698,7 @@ int imx_dma_request(int channel, const char *name)
696 ret = request_irq(MXC_INT_DMACH0 + channel, dma_irq_handler, 0, "DMA", 698 ret = request_irq(MXC_INT_DMACH0 + channel, dma_irq_handler, 0, "DMA",
697 NULL); 699 NULL);
698 if (ret) { 700 if (ret) {
701 local_irq_restore(flags);
699 printk(KERN_CRIT "Can't register IRQ %d for DMA channel %d\n", 702 printk(KERN_CRIT "Can't register IRQ %d for DMA channel %d\n",
700 MXC_INT_DMACH0 + channel, channel); 703 MXC_INT_DMACH0 + channel, channel);
701 return ret; 704 return ret;
@@ -712,7 +715,7 @@ int imx_dma_request(int channel, const char *name)
712 imxdma->sg = NULL; 715 imxdma->sg = NULL;
713 716
714 local_irq_restore(flags); 717 local_irq_restore(flags);
715 return 0; 718 return ret;
716} 719}
717EXPORT_SYMBOL(imx_dma_request); 720EXPORT_SYMBOL(imx_dma_request);
718 721