summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/dma.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-12-08 18:50:25 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-12-11 15:52:42 +0100
commitd667522fdf637ef1b425518afe11aedba80364b2 (patch)
treed8e0bf29d3550692e7831112bb25bbeabb7dd0e2 /arch/arm/kernel/dma.c
parent[ARM] dma: constify dma controller name and dma ops (diff)
downloadlinux-d667522fdf637ef1b425518afe11aedba80364b2.tar.xz
linux-d667522fdf637ef1b425518afe11aedba80364b2.zip
[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.c4
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;