summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-12-08 17:50:25 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-12-11 14:52:42 +0000
commitd667522fdf637ef1b425518afe11aedba80364b2 (patch)
treed8e0bf29d3550692e7831112bb25bbeabb7dd0e2
parent8c56afcbea22e472d3bfa8ddf06f23cd6bc56826 (diff)
[ARM] dma: ensure that the single entry sg is properly initialized
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/kernel/dma.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/kernel/dma.c b/arch/arm/kernel/dma.c
index aab24f03ea1..e7828fcd954 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;