aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-video.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-02-07 03:49:14 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-02-07 03:49:14 -0500
commit3593cab5d62c4c7abced1076710f9bc2d8847433 (patch)
treedd5dc21961f6b4aef6900b0c2eb63ce7c70aecd5 /drivers/media/video/cx88/cx88-video.c
parent538f9630afbbe429ecbcdcf92536200293a8e4b3 (diff)
V4L/DVB (3318b): sem2mutex: drivers/media/, #2
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-video.c')
-rw-r--r--drivers/media/video/cx88/cx88-video.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index 073494ceab0f..d15ef158ac8f 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -336,17 +336,17 @@ static int res_get(struct cx8800_dev *dev, struct cx8800_fh *fh, unsigned int bi
336 return 1; 336 return 1;
337 337
338 /* is it free? */ 338 /* is it free? */
339 down(&core->lock); 339 mutex_lock(&core->lock);
340 if (dev->resources & bit) { 340 if (dev->resources & bit) {
341 /* no, someone else uses it */ 341 /* no, someone else uses it */
342 up(&core->lock); 342 mutex_unlock(&core->lock);
343 return 0; 343 return 0;
344 } 344 }
345 /* it's free, grab it */ 345 /* it's free, grab it */
346 fh->resources |= bit; 346 fh->resources |= bit;
347 dev->resources |= bit; 347 dev->resources |= bit;
348 dprintk(1,"res: get %d\n",bit); 348 dprintk(1,"res: get %d\n",bit);
349 up(&core->lock); 349 mutex_unlock(&core->lock);
350 return 1; 350 return 1;
351} 351}
352 352
@@ -369,11 +369,11 @@ void res_free(struct cx8800_dev *dev, struct cx8800_fh *fh, unsigned int bits)
369 if ((fh->resources & bits) != bits) 369 if ((fh->resources & bits) != bits)
370 BUG(); 370 BUG();
371 371
372 down(&core->lock); 372 mutex_lock(&core->lock);
373 fh->resources &= ~bits; 373 fh->resources &= ~bits;
374 dev->resources &= ~bits; 374 dev->resources &= ~bits;
375 dprintk(1,"res: put %d\n",bits); 375 dprintk(1,"res: put %d\n",bits);
376 up(&core->lock); 376 mutex_unlock(&core->lock);
377} 377}
378 378
379/* ------------------------------------------------------------------ */ 379/* ------------------------------------------------------------------ */
@@ -1291,9 +1291,9 @@ int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
1291 if (i == ARRAY_SIZE(tvnorms)) 1291 if (i == ARRAY_SIZE(tvnorms))
1292 return -EINVAL; 1292 return -EINVAL;
1293 1293
1294 down(&core->lock); 1294 mutex_lock(&core->lock);
1295 cx88_set_tvnorm(core,&tvnorms[i]); 1295 cx88_set_tvnorm(core,&tvnorms[i]);
1296 up(&core->lock); 1296 mutex_unlock(&core->lock);
1297 return 0; 1297 return 0;
1298 } 1298 }
1299 1299
@@ -1343,10 +1343,10 @@ int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
1343 1343
1344 if (*i >= 4) 1344 if (*i >= 4)
1345 return -EINVAL; 1345 return -EINVAL;
1346 down(&core->lock); 1346 mutex_lock(&core->lock);
1347 cx88_newstation(core); 1347 cx88_newstation(core);
1348 video_mux(core,*i); 1348 video_mux(core,*i);
1349 up(&core->lock); 1349 mutex_unlock(&core->lock);
1350 return 0; 1350 return 0;
1351 } 1351 }
1352 1352
@@ -1438,7 +1438,7 @@ int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
1438 return -EINVAL; 1438 return -EINVAL;
1439 if (1 == radio && f->type != V4L2_TUNER_RADIO) 1439 if (1 == radio && f->type != V4L2_TUNER_RADIO)
1440 return -EINVAL; 1440 return -EINVAL;
1441 down(&core->lock); 1441 mutex_lock(&core->lock);
1442 core->freq = f->frequency; 1442 core->freq = f->frequency;
1443 cx88_newstation(core); 1443 cx88_newstation(core);
1444 cx88_call_i2c_clients(core,VIDIOC_S_FREQUENCY,f); 1444 cx88_call_i2c_clients(core,VIDIOC_S_FREQUENCY,f);
@@ -1447,7 +1447,7 @@ int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
1447 msleep (10); 1447 msleep (10);
1448 cx88_set_tvaudio(core); 1448 cx88_set_tvaudio(core);
1449 1449
1450 up(&core->lock); 1450 mutex_unlock(&core->lock);
1451 return 0; 1451 return 0;
1452 } 1452 }
1453 1453
@@ -1921,11 +1921,11 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
1921 pci_set_drvdata(pci_dev,dev); 1921 pci_set_drvdata(pci_dev,dev);
1922 1922
1923 /* initial device configuration */ 1923 /* initial device configuration */
1924 down(&core->lock); 1924 mutex_lock(&core->lock);
1925 cx88_set_tvnorm(core,tvnorms); 1925 cx88_set_tvnorm(core,tvnorms);
1926 init_controls(core); 1926 init_controls(core);
1927 video_mux(core,0); 1927 video_mux(core,0);
1928 up(&core->lock); 1928 mutex_unlock(&core->lock);
1929 1929
1930 /* start tvaudio thread */ 1930 /* start tvaudio thread */
1931 if (core->tuner_type != TUNER_ABSENT) 1931 if (core->tuner_type != TUNER_ABSENT)