diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-31 11:57:53 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-31 11:57:53 -0200 |
commit | 21ed876086e2efb38e6f2dfaf48fae94fe2ec738 (patch) | |
tree | 655bae036dd26c2d65f5d4d666a37a5e5badcd2b /linux/drivers/media/video/saa7134/saa7134-video.c | |
parent | 7fdad17aa5f5e0f8d164613e27d828962100b4c9 (diff) | |
download | mediapointer-dvb-s2-21ed876086e2efb38e6f2dfaf48fae94fe2ec738.tar.gz mediapointer-dvb-s2-21ed876086e2efb38e6f2dfaf48fae94fe2ec738.tar.bz2 |
Renames videobuf lock to vb_lock
From: Mauro Carvalho Chehab <mchehab@infradead.org>
This helps to identify where vb_lock is being used, and find missusages of the
locks.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-video.c')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-video.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c index 16914e455..63e4900b0 100644 --- a/linux/drivers/media/video/saa7134/saa7134-video.c +++ b/linux/drivers/media/video/saa7134/saa7134-video.c @@ -1414,21 +1414,17 @@ video_poll(struct file *file, struct poll_table_struct *wait) if (!list_empty(&fh->cap.stream)) buf = list_entry(fh->cap.stream.next, struct videobuf_buffer, stream); } else { - mutex_lock(&fh->cap.lock); + mutex_lock(&fh->cap.vb_lock); if (UNSET == fh->cap.read_off) { /* need to capture a new frame */ - if (res_locked(fh->dev,RESOURCE_VIDEO)) { - mutex_unlock(&fh->cap.lock); - return POLLERR; - } - if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,fh->cap.field)) { - mutex_unlock(&fh->cap.lock); - return POLLERR; - } + if (res_locked(fh->dev,RESOURCE_VIDEO)) + goto err; + if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,fh->cap.field)) + goto err; fh->cap.ops->buf_queue(&fh->cap,fh->cap.read_buf); fh->cap.read_off = 0; } - mutex_unlock(&fh->cap.lock); + mutex_unlock(&fh->cap.vb_lock); buf = fh->cap.read_buf; } @@ -1440,6 +1436,10 @@ video_poll(struct file *file, struct poll_table_struct *wait) buf->state == VIDEOBUF_ERROR) return POLLIN|POLLRDNORM; return 0; + +err: + mutex_unlock(&fh->cap.vb_lock); + return POLLERR; } static int video_release(struct inode *inode, struct file *file) |