diff options
author | Arjan van de Ven <arjan@infradead.org> | 2006-01-11 15:55:29 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 14:49:55 -0800 |
commit | 4186ecf8ad16dd05759a09594de6a87e48759ba6 (patch) | |
tree | 3ee5292d9f4a36e3eb359b586289ec972bcbaf39 /drivers/usb/media/sn9c102.h | |
parent | 35cce732d9d4d9af6b4ad4d26d8f8c0eddb573a2 (diff) |
[PATCH] USB: convert a bunch of USB semaphores to mutexes
the patch below converts a bunch of semaphores-used-as-mutex in the USB
code to mutexes
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/media/sn9c102.h')
-rw-r--r-- | drivers/usb/media/sn9c102.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/media/sn9c102.h b/drivers/usb/media/sn9c102.h index 17d60c1eea7..59e44be27cb 100644 --- a/drivers/usb/media/sn9c102.h +++ b/drivers/usb/media/sn9c102.h @@ -33,6 +33,7 @@ #include <linux/types.h> #include <linux/param.h> #include <linux/rwsem.h> +#include <linux/mutex.h> #include <asm/semaphore.h> #include "sn9c102_sensor.h" @@ -109,7 +110,7 @@ struct sn9c102_module_param { u8 force_munmap; }; -static DECLARE_MUTEX(sn9c102_sysfs_lock); +static DEFINE_MUTEX(sn9c102_sysfs_lock); static DECLARE_RWSEM(sn9c102_disconnect); struct sn9c102_device { @@ -141,7 +142,7 @@ struct sn9c102_device { enum sn9c102_dev_state state; u8 users; - struct semaphore dev_sem, fileop_sem; + struct mutex dev_mutex, fileop_mutex; spinlock_t queue_lock; wait_queue_head_t open, wait_frame, wait_stream; }; |