diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-31 11:57:53 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-02-18 09:15:12 -0500 |
commit | 64f9477f95bf5d4ba49dc3988d47a15bc06bb5da (patch) | |
tree | f5ff902b731ead3984eb9f9e971289161336f4ba /drivers/media/video/saa7134/saa7134-video.c | |
parent | ce3a35d3c00918296e552af5ecc7b771af766436 (diff) |
V4L/DVB (7121): Renames videobuf lock to vb_lock
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 'drivers/media/video/saa7134/saa7134-video.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 1184d359e848..39c41ad97d0e 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -1414,21 +1414,17 @@ video_poll(struct file *file, struct poll_table_struct *wait) | |||
1414 | if (!list_empty(&fh->cap.stream)) | 1414 | if (!list_empty(&fh->cap.stream)) |
1415 | buf = list_entry(fh->cap.stream.next, struct videobuf_buffer, stream); | 1415 | buf = list_entry(fh->cap.stream.next, struct videobuf_buffer, stream); |
1416 | } else { | 1416 | } else { |
1417 | mutex_lock(&fh->cap.lock); | 1417 | mutex_lock(&fh->cap.vb_lock); |
1418 | if (UNSET == fh->cap.read_off) { | 1418 | if (UNSET == fh->cap.read_off) { |
1419 | /* need to capture a new frame */ | 1419 | /* need to capture a new frame */ |
1420 | if (res_locked(fh->dev,RESOURCE_VIDEO)) { | 1420 | if (res_locked(fh->dev,RESOURCE_VIDEO)) |
1421 | mutex_unlock(&fh->cap.lock); | 1421 | goto err; |
1422 | return POLLERR; | 1422 | if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,fh->cap.field)) |
1423 | } | 1423 | goto err; |
1424 | if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,fh->cap.field)) { | ||
1425 | mutex_unlock(&fh->cap.lock); | ||
1426 | return POLLERR; | ||
1427 | } | ||
1428 | fh->cap.ops->buf_queue(&fh->cap,fh->cap.read_buf); | 1424 | fh->cap.ops->buf_queue(&fh->cap,fh->cap.read_buf); |
1429 | fh->cap.read_off = 0; | 1425 | fh->cap.read_off = 0; |
1430 | } | 1426 | } |
1431 | mutex_unlock(&fh->cap.lock); | 1427 | mutex_unlock(&fh->cap.vb_lock); |
1432 | buf = fh->cap.read_buf; | 1428 | buf = fh->cap.read_buf; |
1433 | } | 1429 | } |
1434 | 1430 | ||
@@ -1440,6 +1436,10 @@ video_poll(struct file *file, struct poll_table_struct *wait) | |||
1440 | buf->state == VIDEOBUF_ERROR) | 1436 | buf->state == VIDEOBUF_ERROR) |
1441 | return POLLIN|POLLRDNORM; | 1437 | return POLLIN|POLLRDNORM; |
1442 | return 0; | 1438 | return 0; |
1439 | |||
1440 | err: | ||
1441 | mutex_unlock(&fh->cap.vb_lock); | ||
1442 | return POLLERR; | ||
1443 | } | 1443 | } |
1444 | 1444 | ||
1445 | static int video_release(struct inode *inode, struct file *file) | 1445 | static int video_release(struct inode *inode, struct file *file) |