diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 03:55:24 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 03:55:24 -0400 |
commit | 9e3043c091819729ecf4fc5063d0a2d0954dfd7f (patch) | |
tree | ee20330eef54d709d276cc56336b8f71eeaa403a /arch/sh/drivers/dma/dma-sh.c | |
parent | e2d1864da5bfa419a108f42c0615f69432b1b876 (diff) |
sh: Fixup TEI IRQ requests in request_dma().
If a channel is not TEI capable, don't try to request_irq()..
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers/dma/dma-sh.c')
-rw-r--r-- | arch/sh/drivers/dma/dma-sh.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c index 4428ee809651..40a480d20aaf 100644 --- a/arch/sh/drivers/dma/dma-sh.c +++ b/arch/sh/drivers/dma/dma-sh.c | |||
@@ -82,6 +82,9 @@ static int sh_dmac_request_dma(struct dma_channel *chan) | |||
82 | { | 82 | { |
83 | char name[32]; | 83 | char name[32]; |
84 | 84 | ||
85 | if (unlikely(!chan->flags & DMA_TEI_CAPABLE)) | ||
86 | return 0; | ||
87 | |||
85 | snprintf(name, sizeof(name), "DMAC Transfer End (Channel %d)", | 88 | snprintf(name, sizeof(name), "DMAC Transfer End (Channel %d)", |
86 | chan->chan); | 89 | chan->chan); |
87 | 90 | ||
@@ -255,7 +258,7 @@ static int __init sh_dmac_init(void) | |||
255 | #ifdef CONFIG_CPU_SH4 | 258 | #ifdef CONFIG_CPU_SH4 |
256 | make_ipr_irq(DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | 259 | make_ipr_irq(DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); |
257 | i = request_irq(DMAE_IRQ, dma_err, IRQF_DISABLED, "DMAC Address Error", 0); | 260 | i = request_irq(DMAE_IRQ, dma_err, IRQF_DISABLED, "DMAC Address Error", 0); |
258 | if (i < 0) | 261 | if (unlikely(i < 0)) |
259 | return i; | 262 | return i; |
260 | #endif | 263 | #endif |
261 | 264 | ||
@@ -270,7 +273,7 @@ static int __init sh_dmac_init(void) | |||
270 | * been set. | 273 | * been set. |
271 | */ | 274 | */ |
272 | i = dmaor_reset(); | 275 | i = dmaor_reset(); |
273 | if (i < 0) | 276 | if (unlikely(i != 0)) |
274 | return i; | 277 | return i; |
275 | 278 | ||
276 | return register_dmac(info); | 279 | return register_dmac(info); |