diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-12-08 12:50:25 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-12-11 09:52:42 -0500 |
commit | d667522fdf637ef1b425518afe11aedba80364b2 (patch) | |
tree | d8e0bf29d3550692e7831112bb25bbeabb7dd0e2 /arch/arm/kernel | |
parent | 8c56afcbea22e472d3bfa8ddf06f23cd6bc56826 (diff) |
[ARM] dma: ensure that the single entry sg is properly initialized
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/dma.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/kernel/dma.c b/arch/arm/kernel/dma.c index aab24f03ea14..e7828fcd9544 100644 --- a/arch/arm/kernel/dma.c +++ b/arch/arm/kernel/dma.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/scatterlist.h> | ||
18 | 19 | ||
19 | #include <asm/dma.h> | 20 | #include <asm/dma.h> |
20 | 21 | ||
@@ -37,6 +38,9 @@ int __init isa_dma_add(unsigned int chan, dma_t *dma) | |||
37 | { | 38 | { |
38 | if (!dma->d_ops) | 39 | if (!dma->d_ops) |
39 | return -EINVAL; | 40 | return -EINVAL; |
41 | |||
42 | sg_init_table(&dma->buf, 1); | ||
43 | |||
40 | if (dma_chan[chan]) | 44 | if (dma_chan[chan]) |
41 | return -EBUSY; | 45 | return -EBUSY; |
42 | dma_chan[chan] = dma; | 46 | dma_chan[chan] = dma; |