diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-02-07 03:49:14 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-02-07 03:49:14 -0500 |
commit | 3593cab5d62c4c7abced1076710f9bc2d8847433 (patch) | |
tree | dd5dc21961f6b4aef6900b0c2eb63ce7c70aecd5 /drivers/media/video/saa5249.c | |
parent | 538f9630afbbe429ecbcdcf92536200293a8e4b3 (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/saa5249.c')
-rw-r--r-- | drivers/media/video/saa5249.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c index 5694eb58c3a1..a9f3cf0b1e3c 100644 --- a/drivers/media/video/saa5249.c +++ b/drivers/media/video/saa5249.c | |||
@@ -56,6 +56,8 @@ | |||
56 | #include <linux/i2c.h> | 56 | #include <linux/i2c.h> |
57 | #include <linux/videotext.h> | 57 | #include <linux/videotext.h> |
58 | #include <linux/videodev.h> | 58 | #include <linux/videodev.h> |
59 | #include <linux/mutex.h> | ||
60 | |||
59 | 61 | ||
60 | #include <asm/io.h> | 62 | #include <asm/io.h> |
61 | #include <asm/uaccess.h> | 63 | #include <asm/uaccess.h> |
@@ -105,7 +107,7 @@ struct saa5249_device | |||
105 | int disp_mode; | 107 | int disp_mode; |
106 | int virtual_mode; | 108 | int virtual_mode; |
107 | struct i2c_client *client; | 109 | struct i2c_client *client; |
108 | struct semaphore lock; | 110 | struct mutex lock; |
109 | }; | 111 | }; |
110 | 112 | ||
111 | 113 | ||
@@ -158,7 +160,7 @@ static int saa5249_attach(struct i2c_adapter *adap, int addr, int kind) | |||
158 | return -ENOMEM; | 160 | return -ENOMEM; |
159 | } | 161 | } |
160 | strlcpy(client->name, IF_NAME, I2C_NAME_SIZE); | 162 | strlcpy(client->name, IF_NAME, I2C_NAME_SIZE); |
161 | init_MUTEX(&t->lock); | 163 | mutex_init(&t->lock); |
162 | 164 | ||
163 | /* | 165 | /* |
164 | * Now create a video4linux device | 166 | * Now create a video4linux device |
@@ -619,9 +621,9 @@ static int saa5249_ioctl(struct inode *inode, struct file *file, | |||
619 | int err; | 621 | int err; |
620 | 622 | ||
621 | cmd = vtx_fix_command(cmd); | 623 | cmd = vtx_fix_command(cmd); |
622 | down(&t->lock); | 624 | mutex_lock(&t->lock); |
623 | err = video_usercopy(inode,file,cmd,arg,do_saa5249_ioctl); | 625 | err = video_usercopy(inode,file,cmd,arg,do_saa5249_ioctl); |
624 | up(&t->lock); | 626 | mutex_unlock(&t->lock); |
625 | return err; | 627 | return err; |
626 | } | 628 | } |
627 | 629 | ||