dmaengine: shdma: Fix SH_DMAC_MAX_CHANNELS handling
authorMagnus Damm <damm@opensource.se>
Tue, 24 May 2011 10:31:20 +0000 (10:31 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 25 May 2011 02:36:15 +0000 (11:36 +0900)
commit300e5f97d2a32196cbe03104cd6ffe2af97d9338
tree1863d889aa757365d321e5b6a48db3c92979ac79
parent26fc02ab5551349b2e593829a76cb44328ee7f61
dmaengine: shdma: Fix SH_DMAC_MAX_CHANNELS handling

Fix the shdma.c handing of SH_DMAC_MAX_CHANNELS
to avoid overwriting the chan_irq[] and chan_flag[]
arrays in the case of pdata->channel_num is larger
than SH_DMAC_MAX_CHANNELS.

With this patch applied up to SH_DMAC_MAX_CHANNELS
will be used by the shdma.c driver. If more channels
are available in the platform data the user will
be notified on the console.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/dma/shdma.c