Commit 9e3043c0 authored by Paul Mundt's avatar Paul Mundt

sh: Fixup TEI IRQ requests in request_dma().

If a channel is not TEI capable, don't try to request_irq()..
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent e2d1864d
...@@ -82,6 +82,9 @@ static int sh_dmac_request_dma(struct dma_channel *chan) ...@@ -82,6 +82,9 @@ static int sh_dmac_request_dma(struct dma_channel *chan)
{ {
char name[32]; char name[32];
if (unlikely(!chan->flags & DMA_TEI_CAPABLE))
return 0;
snprintf(name, sizeof(name), "DMAC Transfer End (Channel %d)", snprintf(name, sizeof(name), "DMAC Transfer End (Channel %d)",
chan->chan); chan->chan);
...@@ -255,7 +258,7 @@ static int __init sh_dmac_init(void) ...@@ -255,7 +258,7 @@ static int __init sh_dmac_init(void)
#ifdef CONFIG_CPU_SH4 #ifdef CONFIG_CPU_SH4
make_ipr_irq(DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); make_ipr_irq(DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY);
i = request_irq(DMAE_IRQ, dma_err, IRQF_DISABLED, "DMAC Address Error", 0); i = request_irq(DMAE_IRQ, dma_err, IRQF_DISABLED, "DMAC Address Error", 0);
if (i < 0) if (unlikely(i < 0))
return i; return i;
#endif #endif
...@@ -270,7 +273,7 @@ static int __init sh_dmac_init(void) ...@@ -270,7 +273,7 @@ static int __init sh_dmac_init(void)
* been set. * been set.
*/ */
i = dmaor_reset(); i = dmaor_reset();
if (i < 0) if (unlikely(i != 0))
return i; return i;
return register_dmac(info); return register_dmac(info);
......
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