aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog/pcwd_usb.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-03-23 06:00:27 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 10:38:11 -0500
commit6f87f0deebaff2716a3ce9232f948d702690562a (patch)
tree85f532fe39be7c224635dd9ed0198668c30bafa3 /drivers/char/watchdog/pcwd_usb.c
parentb1c82b5c55851bf309f4019994610789f7042757 (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/pcwd_usb.c')
-rw-r--r--drivers/char/watchdog/pcwd_usb.c7
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 @@
42#include <linux/completion.h> 42#include <linux/completion.h>
43#include <asm/uaccess.h> 43#include <asm/uaccess.h>
44#include <linux/usb.h> 44#include <linux/usb.h>
45#include <linux/mutex.h>
45 46
46 47
47#ifdef CONFIG_USB_DEBUG 48#ifdef CONFIG_USB_DEBUG
@@ -143,7 +144,7 @@ struct usb_pcwd_private {
143static struct usb_pcwd_private *usb_pcwd_device; 144static struct usb_pcwd_private *usb_pcwd_device;
144 145
145/* prevent races between open() and disconnect() */ 146/* prevent races between open() and disconnect() */
146static DECLARE_MUTEX (disconnect_sem); 147static DEFINE_MUTEX(disconnect_mutex);
147 148
148/* local function prototypes */ 149/* local function prototypes */
149static int usb_pcwd_probe (struct usb_interface *interface, const struct usb_device_id *id); 150static 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)
723 struct usb_pcwd_private *usb_pcwd; 724 struct usb_pcwd_private *usb_pcwd;
724 725
725 /* prevent races with open() */ 726 /* prevent races with open() */
726 down (&disconnect_sem); 727 mutex_lock(&disconnect_mutex);
727 728
728 usb_pcwd = usb_get_intfdata (interface); 729 usb_pcwd = usb_get_intfdata (interface);
729 usb_set_intfdata (interface, NULL); 730 usb_set_intfdata (interface, NULL);
@@ -749,7 +750,7 @@ static void usb_pcwd_disconnect(struct usb_interface *interface)
749 750
750 cards_found--; 751 cards_found--;
751 752
752 up (&disconnect_sem); 753 mutex_unlock(&disconnect_mutex);
753 754
754 printk(KERN_INFO PFX "USB PC Watchdog disconnected\n"); 755 printk(KERN_INFO PFX "USB PC Watchdog disconnected\n");
755} 756}