aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/zoran_card.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-03-22 01:54:16 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-03-23 09:24:19 -0500
commit384c36893f94e0e2145832cf2f20684ae372aee5 (patch)
tree14a70539e5c4601a9d1e82beaf5990560f2852b1 /drivers/media/video/zoran_card.c
parent6201573cc9bfe1e0bdec229bed8e95b0dc88a587 (diff)
V4L/DVB (3568g): sem2mutex: zoran
Semaphore to mutexes 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/zoran_card.c')
-rw-r--r--drivers/media/video/zoran_card.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/video/zoran_card.c b/drivers/media/video/zoran_card.c
index a2e528ccf28a..b22dbb6d18f6 100644
--- a/drivers/media/video/zoran_card.c
+++ b/drivers/media/video/zoran_card.c
@@ -47,6 +47,7 @@
47#include <linux/interrupt.h> 47#include <linux/interrupt.h>
48#include <linux/video_decoder.h> 48#include <linux/video_decoder.h>
49#include <linux/video_encoder.h> 49#include <linux/video_encoder.h>
50#include <linux/mutex.h>
50 51
51#include <asm/io.h> 52#include <asm/io.h>
52 53
@@ -673,7 +674,7 @@ zoran_i2c_client_register (struct i2c_client *client)
673 KERN_DEBUG "%s: i2c_client_register() - driver id = %d\n", 674 KERN_DEBUG "%s: i2c_client_register() - driver id = %d\n",
674 ZR_DEVNAME(zr), client->driver->id); 675 ZR_DEVNAME(zr), client->driver->id);
675 676
676 down(&zr->resource_lock); 677 mutex_lock(&zr->resource_lock);
677 678
678 if (zr->user > 0) { 679 if (zr->user > 0) {
679 /* we're already busy, so we keep a reference to 680 /* we're already busy, so we keep a reference to
@@ -694,7 +695,7 @@ zoran_i2c_client_register (struct i2c_client *client)
694 } 695 }
695 696
696clientreg_unlock_and_return: 697clientreg_unlock_and_return:
697 up(&zr->resource_lock); 698 mutex_unlock(&zr->resource_lock);
698 699
699 return res; 700 return res;
700} 701}
@@ -707,7 +708,7 @@ zoran_i2c_client_unregister (struct i2c_client *client)
707 708
708 dprintk(2, KERN_DEBUG "%s: i2c_client_unregister()\n", ZR_DEVNAME(zr)); 709 dprintk(2, KERN_DEBUG "%s: i2c_client_unregister()\n", ZR_DEVNAME(zr));
709 710
710 down(&zr->resource_lock); 711 mutex_lock(&zr->resource_lock);
711 712
712 if (zr->user > 0) { 713 if (zr->user > 0) {
713 res = -EBUSY; 714 res = -EBUSY;
@@ -722,7 +723,7 @@ zoran_i2c_client_unregister (struct i2c_client *client)
722 snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), "MJPEG[%d]", zr->id); 723 snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), "MJPEG[%d]", zr->id);
723 } 724 }
724clientunreg_unlock_and_return: 725clientunreg_unlock_and_return:
725 up(&zr->resource_lock); 726 mutex_unlock(&zr->resource_lock);
726 return res; 727 return res;
727} 728}
728 729
@@ -1202,7 +1203,7 @@ find_zr36057 (void)
1202 zr->id = zoran_num; 1203 zr->id = zoran_num;
1203 snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), "MJPEG[%u]", zr->id); 1204 snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), "MJPEG[%u]", zr->id);
1204 spin_lock_init(&zr->spinlock); 1205 spin_lock_init(&zr->spinlock);
1205 init_MUTEX(&zr->resource_lock); 1206 mutex_init(&zr->resource_lock);
1206 if (pci_enable_device(dev)) 1207 if (pci_enable_device(dev))
1207 continue; 1208 continue;
1208 zr->zr36057_adr = pci_resource_start(zr->pci_dev, 0); 1209 zr->zr36057_adr = pci_resource_start(zr->pci_dev, 0);