diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 08:03:56 (GMT) |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 08:03:56 (GMT) |
commit | 0f08f338083cc1d68788ccbccc44bd0502fc57ae (patch) | |
tree | 97c69dbbd63a108a7367644dadedd390a3948f0c /arch/sh/drivers/dma/dma-sh.c | |
parent | 9e3043c091819729ecf4fc5063d0a2d0954dfd7f (diff) | |
download | linux-fsl-qoriq-0f08f338083cc1d68788ccbccc44bd0502fc57ae.tar.xz |
sh: More cosmetic cleanups and trivial fixes.
Nothing exciting here, just trivial fixes..
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 | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c index 40a480d..cbbe8bc 100644 --- a/arch/sh/drivers/dma/dma-sh.c +++ b/arch/sh/drivers/dma/dma-sh.c @@ -80,21 +80,23 @@ static irqreturn_t dma_tei(int irq, void *dev_id, struct pt_regs *regs) static int sh_dmac_request_dma(struct dma_channel *chan) { - char name[32]; - if (unlikely(!chan->flags & DMA_TEI_CAPABLE)) return 0; - snprintf(name, sizeof(name), "DMAC Transfer End (Channel %d)", + chan->name = kzalloc(32, GFP_KERNEL); + if (unlikely(chan->name == NULL)) + return -ENOMEM; + snprintf(chan->name, 32, "DMAC Transfer End (Channel %d)", chan->chan); return request_irq(get_dmte_irq(chan->chan), dma_tei, - IRQF_DISABLED, name, chan); + IRQF_DISABLED, chan->name, chan); } static void sh_dmac_free_dma(struct dma_channel *chan) { free_irq(get_dmte_irq(chan->chan), chan); + kfree(chan->name); } static void |