diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-16 09:46:24 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-16 09:46:24 -0700 |
commit | f8f44f09eaa2bfb40651e7fc6054d65c8091499a (patch) | |
tree | d68df2dca22c6450b1cbb43cd314a47557920187 /drivers/dma/shdma.c | |
parent | f49cc57cc9d1686bdca068c40bc43f1690aa02d3 (diff) | |
parent | 261a9af671a79b750cb170bac620601d686535c1 (diff) | |
download | kernel_samsung_crespo-f8f44f09eaa2bfb40651e7fc6054d65c8091499a.zip kernel_samsung_crespo-f8f44f09eaa2bfb40651e7fc6054d65c8091499a.tar.gz kernel_samsung_crespo-f8f44f09eaa2bfb40651e7fc6054d65c8091499a.tar.bz2 |
Merge branch 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-3.x
* 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-3.x:
sh: sh7724: Add USBHS DMAEngine support
sh: ecovec: Add renesas_usbhs support
sh, exec: remove redundant set_fs(USER_DS)
drivers: sh: resume enabled clocks fix
dmaengine: shdma: SH_DMAC_MAX_CHANNELS message fix
sh: Fix up xchg/cmpxchg corruption with gUSA RB.
sh: Remove compressed kernel libgcc dependency.
sh: fix wrong icache/dcache address-array start addr in cache-debugfs.
Diffstat (limited to 'drivers/dma/shdma.c')
-rw-r--r-- | drivers/dma/shdma.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 2a638f9..0283300 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c @@ -1221,6 +1221,11 @@ static int __init sh_dmae_probe(struct platform_device *pdev) } else { do { for (i = chanirq_res->start; i <= chanirq_res->end; i++) { + if (irq_cnt >= SH_DMAC_MAX_CHANNELS) { + irq_cap = 1; + break; + } + if ((errirq_res->flags & IORESOURCE_BITS) == IORESOURCE_IRQ_SHAREABLE) chan_flag[irq_cnt] = IRQF_SHARED; @@ -1230,15 +1235,11 @@ static int __init sh_dmae_probe(struct platform_device *pdev) "Found IRQ %d for channel %d\n", i, irq_cnt); chan_irq[irq_cnt++] = i; - - if (irq_cnt >= SH_DMAC_MAX_CHANNELS) - break; } - if (irq_cnt >= SH_DMAC_MAX_CHANNELS) { - irq_cap = 1; + if (irq_cnt >= SH_DMAC_MAX_CHANNELS) break; - } + chanirq_res = platform_get_resource(pdev, IORESOURCE_IRQ, ++irqres); } while (irq_cnt < pdata->channel_num && chanirq_res); |