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>
这个提交包含在:
Ingo Molnar
2006-02-07 06:49:14 -02:00
提交者 Mauro Carvalho Chehab
父节点 538f9630af
当前提交 3593cab5d6
修改 79 个文件,包含 749 行新增718 行删除

查看文件

@@ -37,7 +37,8 @@
#include <linux/sched.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/semaphore.h>
#include <linux/mutex.h>
#include <linux/pci.h>
#include <linux/videodev.h>
@@ -101,7 +102,7 @@ static struct radio_device
unsigned long freq;
struct semaphore lock;
struct mutex lock;
} radio_unit = {0, 0, 0, 0, };
@@ -267,9 +268,9 @@ static int radio_ioctl(struct inode *inode, struct file *file,
struct radio_device *card=dev->priv;
int ret;
down(&card->lock);
mutex_lock(&card->lock);
ret = video_usercopy(inode, file, cmd, arg, radio_function);
up(&card->lock);
mutex_unlock(&card->lock);
return ret;
}
@@ -290,7 +291,7 @@ static int __devinit maxiradio_init_one(struct pci_dev *pdev, const struct pci_d
goto err_out_free_region;
radio_unit.io = pci_resource_start(pdev, 0);
init_MUTEX(&radio_unit.lock);
mutex_init(&radio_unit.lock);
maxiradio_radio.priv = &radio_unit;
if(video_register_device(&maxiradio_radio, VFL_TYPE_RADIO, radio_nr)==-1) {