diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-12-08 17:50:25 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-12-11 14:52:42 +0000 |
commit | d667522fdf637ef1b425518afe11aedba80364b2 (patch) | |
tree | d8e0bf29d3550692e7831112bb25bbeabb7dd0e2 /arch/arm/kernel/dma.c | |
parent | 8c56afcbea22e472d3bfa8ddf06f23cd6bc56826 (diff) | |
download | linux-d667522fdf637ef1b425518afe11aedba80364b2.tar.bz2 |
[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/dma.c')
-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 @@ #include <linux/init.h> #include <linux/spinlock.h> #include <linux/errno.h> +#include <linux/scatterlist.h> #include <asm/dma.h> @@ -37,6 +38,9 @@ int __init isa_dma_add(unsigned int chan, dma_t *dma) { if (!dma->d_ops) return -EINVAL; + + sg_init_table(&dma->buf, 1); + if (dma_chan[chan]) return -EBUSY; dma_chan[chan] = dma; |