diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 04:03:56 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 04:03:56 -0400 |
commit | 0f08f338083cc1d68788ccbccc44bd0502fc57ae (patch) | |
tree | 97c69dbbd63a108a7367644dadedd390a3948f0c /arch/sh/drivers | |
parent | 9e3043c091819729ecf4fc5063d0a2d0954dfd7f (diff) |
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')
-rw-r--r-- | arch/sh/drivers/dma/dma-sh.c | 10 | ||||
-rw-r--r-- | arch/sh/drivers/pci/ops-titan.c | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c index 40a480d20aaf..cbbe8bce3d67 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) | |||
80 | 80 | ||
81 | static int sh_dmac_request_dma(struct dma_channel *chan) | 81 | static int sh_dmac_request_dma(struct dma_channel *chan) |
82 | { | 82 | { |
83 | char name[32]; | ||
84 | |||
85 | if (unlikely(!chan->flags & DMA_TEI_CAPABLE)) | 83 | if (unlikely(!chan->flags & DMA_TEI_CAPABLE)) |
86 | return 0; | 84 | return 0; |
87 | 85 | ||
88 | snprintf(name, sizeof(name), "DMAC Transfer End (Channel %d)", | 86 | chan->name = kzalloc(32, GFP_KERNEL); |
87 | if (unlikely(chan->name == NULL)) | ||
88 | return -ENOMEM; | ||
89 | snprintf(chan->name, 32, "DMAC Transfer End (Channel %d)", | ||
89 | chan->chan); | 90 | chan->chan); |
90 | 91 | ||
91 | return request_irq(get_dmte_irq(chan->chan), dma_tei, | 92 | return request_irq(get_dmte_irq(chan->chan), dma_tei, |
92 | IRQF_DISABLED, name, chan); | 93 | IRQF_DISABLED, chan->name, chan); |
93 | } | 94 | } |
94 | 95 | ||
95 | static void sh_dmac_free_dma(struct dma_channel *chan) | 96 | static void sh_dmac_free_dma(struct dma_channel *chan) |
96 | { | 97 | { |
97 | free_irq(get_dmte_irq(chan->chan), chan); | 98 | free_irq(get_dmte_irq(chan->chan), chan); |
99 | kfree(chan->name); | ||
98 | } | 100 | } |
99 | 101 | ||
100 | static void | 102 | static void |
diff --git a/arch/sh/drivers/pci/ops-titan.c b/arch/sh/drivers/pci/ops-titan.c index 9c8b2027c35d..c6097bcd97fd 100644 --- a/arch/sh/drivers/pci/ops-titan.c +++ b/arch/sh/drivers/pci/ops-titan.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/pci.h> | ||
19 | #include <asm/io.h> | 20 | #include <asm/io.h> |
20 | #include <asm/titan.h> | 21 | #include <asm/titan.h> |
21 | #include "pci-sh4.h" | 22 | #include "pci-sh4.h" |