Commit 7c995023 authored by Sascha Hauer's avatar Sascha Hauer

[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: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent b71edbe9
...@@ -511,6 +511,7 @@ void imx_dma_disable(int channel) ...@@ -511,6 +511,7 @@ void imx_dma_disable(int channel)
} }
EXPORT_SYMBOL(imx_dma_disable); EXPORT_SYMBOL(imx_dma_disable);
#ifdef CONFIG_ARCH_MX2
static void imx_dma_watchdog(unsigned long chno) static void imx_dma_watchdog(unsigned long chno)
{ {
struct imx_dma_channel *imxdma = &imx_dma_channels[chno]; struct imx_dma_channel *imxdma = &imx_dma_channels[chno];
...@@ -522,6 +523,7 @@ static void imx_dma_watchdog(unsigned long chno) ...@@ -522,6 +523,7 @@ static void imx_dma_watchdog(unsigned long chno)
if (imxdma->err_handler) if (imxdma->err_handler)
imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT); imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT);
} }
#endif
static irqreturn_t dma_err_handler(int irq, void *dev_id) static irqreturn_t dma_err_handler(int irq, void *dev_id)
{ {
...@@ -674,7 +676,7 @@ int imx_dma_request(int channel, const char *name) ...@@ -674,7 +676,7 @@ int imx_dma_request(int channel, const char *name)
{ {
struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
unsigned long flags; unsigned long flags;
int ret; int ret = 0;
/* basic sanity checks */ /* basic sanity checks */
if (!name) if (!name)
...@@ -696,6 +698,7 @@ int imx_dma_request(int channel, const char *name) ...@@ -696,6 +698,7 @@ int imx_dma_request(int channel, const char *name)
ret = request_irq(MXC_INT_DMACH0 + channel, dma_irq_handler, 0, "DMA", ret = request_irq(MXC_INT_DMACH0 + channel, dma_irq_handler, 0, "DMA",
NULL); NULL);
if (ret) { if (ret) {
local_irq_restore(flags);
printk(KERN_CRIT "Can't register IRQ %d for DMA channel %d\n", printk(KERN_CRIT "Can't register IRQ %d for DMA channel %d\n",
MXC_INT_DMACH0 + channel, channel); MXC_INT_DMACH0 + channel, channel);
return ret; return ret;
...@@ -712,7 +715,7 @@ int imx_dma_request(int channel, const char *name) ...@@ -712,7 +715,7 @@ int imx_dma_request(int channel, const char *name)
imxdma->sg = NULL; imxdma->sg = NULL;
local_irq_restore(flags); local_irq_restore(flags);
return 0; return ret;
} }
EXPORT_SYMBOL(imx_dma_request); EXPORT_SYMBOL(imx_dma_request);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment