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/saa5246a.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/saa5246a.c')
-rw-r--r-- | drivers/media/video/saa5246a.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c index 2ce010201308..dd830e0e5e96 100644 --- a/drivers/media/video/saa5246a.c +++ b/drivers/media/video/saa5246a.c | |||
@@ -46,6 +46,8 @@ | |||
46 | #include <linux/i2c.h> | 46 | #include <linux/i2c.h> |
47 | #include <linux/videotext.h> | 47 | #include <linux/videotext.h> |
48 | #include <linux/videodev.h> | 48 | #include <linux/videodev.h> |
49 | #include <linux/mutex.h> | ||
50 | |||
49 | #include "saa5246a.h" | 51 | #include "saa5246a.h" |
50 | 52 | ||
51 | MODULE_AUTHOR("Michael Geng <linux@MichaelGeng.de>"); | 53 | MODULE_AUTHOR("Michael Geng <linux@MichaelGeng.de>"); |
@@ -57,7 +59,7 @@ struct saa5246a_device | |||
57 | u8 pgbuf[NUM_DAUS][VTX_VIRTUALSIZE]; | 59 | u8 pgbuf[NUM_DAUS][VTX_VIRTUALSIZE]; |
58 | int is_searching[NUM_DAUS]; | 60 | int is_searching[NUM_DAUS]; |
59 | struct i2c_client *client; | 61 | struct i2c_client *client; |
60 | struct semaphore lock; | 62 | struct mutex lock; |
61 | }; | 63 | }; |
62 | 64 | ||
63 | static struct video_device saa_template; /* Declared near bottom */ | 65 | static struct video_device saa_template; /* Declared near bottom */ |
@@ -90,7 +92,7 @@ static int saa5246a_attach(struct i2c_adapter *adap, int addr, int kind) | |||
90 | return -ENOMEM; | 92 | return -ENOMEM; |
91 | } | 93 | } |
92 | strlcpy(client->name, IF_NAME, I2C_NAME_SIZE); | 94 | strlcpy(client->name, IF_NAME, I2C_NAME_SIZE); |
93 | init_MUTEX(&t->lock); | 95 | mutex_init(&t->lock); |
94 | 96 | ||
95 | /* | 97 | /* |
96 | * Now create a video4linux device | 98 | * Now create a video4linux device |
@@ -719,9 +721,9 @@ static int saa5246a_ioctl(struct inode *inode, struct file *file, | |||
719 | int err; | 721 | int err; |
720 | 722 | ||
721 | cmd = vtx_fix_command(cmd); | 723 | cmd = vtx_fix_command(cmd); |
722 | down(&t->lock); | 724 | mutex_lock(&t->lock); |
723 | err = video_usercopy(inode, file, cmd, arg, do_saa5246a_ioctl); | 725 | err = video_usercopy(inode, file, cmd, arg, do_saa5246a_ioctl); |
724 | up(&t->lock); | 726 | mutex_unlock(&t->lock); |
725 | return err; | 727 | return err; |
726 | } | 728 | } |
727 | 729 | ||