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 | |
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')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-empress.c | 8 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 20 |
2 files changed, 14 insertions, 14 deletions
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index b1b01fa86720..94b81e1a7530 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c | |||
@@ -87,7 +87,7 @@ static int ts_open(struct inode *inode, struct file *file) | |||
87 | 87 | ||
88 | dprintk("open minor=%d\n",minor); | 88 | dprintk("open minor=%d\n",minor); |
89 | err = -EBUSY; | 89 | err = -EBUSY; |
90 | if (!mutex_trylock(&dev->empress_tsq.lock)) | 90 | if (!mutex_trylock(&dev->empress_tsq.vb_lock)) |
91 | goto done; | 91 | goto done; |
92 | if (dev->empress_users) | 92 | if (dev->empress_users) |
93 | goto done_up; | 93 | goto done_up; |
@@ -101,7 +101,7 @@ static int ts_open(struct inode *inode, struct file *file) | |||
101 | err = 0; | 101 | err = 0; |
102 | 102 | ||
103 | done_up: | 103 | done_up: |
104 | mutex_unlock(&dev->empress_tsq.lock); | 104 | mutex_unlock(&dev->empress_tsq.vb_lock); |
105 | done: | 105 | done: |
106 | return err; | 106 | return err; |
107 | } | 107 | } |
@@ -110,7 +110,7 @@ static int ts_release(struct inode *inode, struct file *file) | |||
110 | { | 110 | { |
111 | struct saa7134_dev *dev = file->private_data; | 111 | struct saa7134_dev *dev = file->private_data; |
112 | 112 | ||
113 | mutex_lock(&dev->empress_tsq.lock); | 113 | mutex_lock(&dev->empress_tsq.vb_lock); |
114 | videobuf_stop(&dev->empress_tsq); | 114 | videobuf_stop(&dev->empress_tsq); |
115 | videobuf_mmap_free(&dev->empress_tsq); | 115 | videobuf_mmap_free(&dev->empress_tsq); |
116 | dev->empress_users--; | 116 | dev->empress_users--; |
@@ -122,7 +122,7 @@ static int ts_release(struct inode *inode, struct file *file) | |||
122 | saa_writeb(SAA7134_AUDIO_MUTE_CTRL, | 122 | saa_writeb(SAA7134_AUDIO_MUTE_CTRL, |
123 | saa_readb(SAA7134_AUDIO_MUTE_CTRL) | (1 << 6)); | 123 | saa_readb(SAA7134_AUDIO_MUTE_CTRL) | (1 << 6)); |
124 | 124 | ||
125 | mutex_unlock(&dev->empress_tsq.lock); | 125 | mutex_unlock(&dev->empress_tsq.vb_lock); |
126 | return 0; | 126 | return 0; |
127 | } | 127 | } |
128 | 128 | ||
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) |