diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-03-23 03:00:27 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 07:38:11 -0800 |
commit | 6f87f0deebaff2716a3ce9232f948d702690562a (patch) | |
tree | 85f532fe39be7c224635dd9ed0198668c30bafa3 /drivers/char/watchdog | |
parent | b1c82b5c55851bf309f4019994610789f7042757 (diff) |
[PATCH] sem2mutex: drivers/char/
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>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/watchdog')
-rw-r--r-- | drivers/char/watchdog/pcwd_usb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/watchdog/pcwd_usb.c b/drivers/char/watchdog/pcwd_usb.c index 1533f56baa42..2700c5c45b8a 100644 --- a/drivers/char/watchdog/pcwd_usb.c +++ b/drivers/char/watchdog/pcwd_usb.c @@ -42,6 +42,7 @@ #include <linux/completion.h> #include <asm/uaccess.h> #include <linux/usb.h> +#include <linux/mutex.h> #ifdef CONFIG_USB_DEBUG @@ -143,7 +144,7 @@ struct usb_pcwd_private { static struct usb_pcwd_private *usb_pcwd_device; /* prevent races between open() and disconnect() */ -static DECLARE_MUTEX (disconnect_sem); +static DEFINE_MUTEX(disconnect_mutex); /* local function prototypes */ static int usb_pcwd_probe (struct usb_interface *interface, const struct usb_device_id *id); @@ -723,7 +724,7 @@ static void usb_pcwd_disconnect(struct usb_interface *interface) struct usb_pcwd_private *usb_pcwd; /* prevent races with open() */ - down (&disconnect_sem); + mutex_lock(&disconnect_mutex); usb_pcwd = usb_get_intfdata (interface); usb_set_intfdata (interface, NULL); @@ -749,7 +750,7 @@ static void usb_pcwd_disconnect(struct usb_interface *interface) cards_found--; - up (&disconnect_sem); + mutex_unlock(&disconnect_mutex); printk(KERN_INFO PFX "USB PC Watchdog disconnected\n"); } |