From: Russell King Date: Mon, 8 Dec 2008 17:50:25 +0000 (+0000) Subject: [ARM] dma: ensure that the single entry sg is properly initialized X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d667522fdf637ef1b425518afe11aedba80364b2;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [ARM] dma: ensure that the single entry sg is properly initialized Signed-off-by: Russell King --- 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 #include #include +#include #include @@ -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;