From: Mauro Carvalho Chehab Date: Mon, 27 Aug 2007 10:55:38 +0000 (-0300) Subject: V4L/DVB (12791): tm6000: fix poll() method X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=dc6a02aa35cc3c1dd84e06fa4ff300ae50bc5a70;p=openwrt%2Fstaging%2Fblogic.git V4L/DVB (12791): tm6000: fix poll() method Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 9557dfe95ef0..f96c7a77efb6 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -1449,9 +1449,8 @@ tm6000_poll(struct file *file, struct poll_table_struct *wait) buf = list_entry(fh->vb_vidq.stream.next,struct tm6000_buffer,vb.stream); } else { /* read() capture */ - buf = (struct tm6000_buffer*)fh->vb_vidq.read_buf; - if (NULL == buf) - return POLLERR; + return videobuf_poll_stream(file, &fh->vb_vidq, + wait); } poll_wait(file, &buf->vb.done, wait); if (buf->vb.state == STATE_DONE ||