summaryrefslogtreecommitdiff
path: root/drivers/media/video/em28xx/em28xx-dvb.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-17 21:38:38 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 14:09:41 -0300
commit52284c3e47bf502aaff72ab2ede509193b628b1b (patch)
treefc7d554be7fa0cc2872c585200027eceb17c0d7a /drivers/media/video/em28xx/em28xx-dvb.c
parentbdfbf9520372daf2b4d6941474c92310848ccb27 (diff)
V4L/DVB (7599): em28xx-dvb: videobuf callbacks are waiting for em28xx_fh
Thanks to Devin Heitmueller <devin.heitmueller@gmail.com> for pointing this issue. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-dvb.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-dvb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index cbc155d302c8..d3d52972cd84 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -45,6 +45,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;
@@ -109,11 +110,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) {