From a4c6b3f9f6156e89d7dd1ec89395aecaa95c44ef Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 17 Apr 2008 18:38:38 -0300 Subject: em28xx-dvb: videobuf callbacks are waiting for em28xx_fh From: Mauro Carvalho Chehab Thanks to Devin Heitmueller for pointing this issue. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/em28xx/em28xx-dvb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media/video/em28xx/em28xx-dvb.c') diff --git a/linux/drivers/media/video/em28xx/em28xx-dvb.c b/linux/drivers/media/video/em28xx/em28xx-dvb.c index af76ebbb1..33e83ea06 100644 --- a/linux/drivers/media/video/em28xx/em28xx-dvb.c +++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c @@ -46,6 +46,7 @@ buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size) struct em28xx_fh *fh = vq->priv_data; struct em28xx *dev = fh->dev; + /* FIXME: The better would be to allocate a smaller buffer */ *size = 16 * fh->dev->width * fh->dev->height >> 3; if (0 == *count) *count = EM28XX_DEF_BUF; @@ -110,11 +111,16 @@ static int dvb_init(struct em28xx *dev) dev->qops->buf_setup = buffer_setup; + /* FIXME: Do we need more initialization here? */ + memset(&dev->dvb_fh, 0, sizeof (dev->dvb_fh)); + dev->dvb_fh.dev = dev; + dev->dvb_fh.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + videobuf_queue_vmalloc_init(&dev->dvb.dvbq, dev->qops, &dev->udev->dev, &dev->slock, V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_ALTERNATE, - sizeof(struct em28xx_buffer), dev); + sizeof(struct em28xx_buffer), &dev->dvb_fh); /* init frontend */ switch (dev->model) { -- cgit v1.2.3