V4L: ivtv: Add missing sg_init_table()
authorIan Armstrong <ian@iarmst.demon.co.uk>
Sat, 22 Mar 2008 19:59:02 +0000 (15:59 -0400)
committerChris Wright <chrisw@sous-sol.org>
Sat, 19 Apr 2008 01:53:19 +0000 (18:53 -0700)
upstream commit: 165e1213e13b49761f8b3fd9314701f83cf3db3a

If a dma transfer is attempted for either yuv or framebuffer output, a
missing sg_init_table() call causes a kernel BUG in scatterlist.h if
CONFIG_DEBUG_SG is set.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/media/video/ivtv/ivtv-driver.c

index 6d2dd8764f814c3ae85fc5b96d45bdc080379335..9aa5b148bcb3b0873dd458eb0112abcf6e85815c 100644 (file)
@@ -687,6 +687,9 @@ static int __devinit ivtv_init_struct1(struct ivtv *itv)
        itv->vbi.in.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
        itv->vbi.sliced_in = &itv->vbi.in.fmt.sliced;
 
+       /* Init the sg table for osd/yuv output */
+       sg_init_table(itv->udma.SGlist, IVTV_DMA_SG_OSD_ENT);
+
        /* OSD */
        itv->osd_global_alpha_state = 1;
        itv->osd_global_alpha = 255;