git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
drivers
/
char
/
watchdog
/
pcwd_usb.c
diff --git
a/drivers/char/watchdog/pcwd_usb.c
b/drivers/char/watchdog/pcwd_usb.c
index
3fdfda9
..
1533f56
100644
(file)
--- a/
drivers/char/watchdog/pcwd_usb.c
+++ b/
drivers/char/watchdog/pcwd_usb.c
@@
-42,7
+42,6
@@
#include <linux/completion.h>
#include <asm/uaccess.h>
#include <linux/usb.h>
#include <linux/completion.h>
#include <asm/uaccess.h>
#include <linux/usb.h>
-#include <linux/mutex.h>
#ifdef CONFIG_USB_DEBUG
#ifdef CONFIG_USB_DEBUG
@@
-144,7
+143,7
@@
struct usb_pcwd_private {
static struct usb_pcwd_private *usb_pcwd_device;
/* prevent races between open() and disconnect() */
static struct usb_pcwd_private *usb_pcwd_device;
/* prevent races between open() and disconnect() */
-static DE
FINE_MUTEX(disconnect_mutex
);
+static DE
CLARE_MUTEX (disconnect_sem
);
/* local function prototypes */
static int usb_pcwd_probe (struct usb_interface *interface, const struct usb_device_id *id);
/* local function prototypes */
static int usb_pcwd_probe (struct usb_interface *interface, const struct usb_device_id *id);
@@
-705,8
+704,7
@@
err_out_misc_deregister:
err_out_unregister_reboot:
unregister_reboot_notifier(&usb_pcwd_notifier);
error:
err_out_unregister_reboot:
unregister_reboot_notifier(&usb_pcwd_notifier);
error:
- if (usb_pcwd)
- usb_pcwd_delete(usb_pcwd);
+ usb_pcwd_delete (usb_pcwd);
usb_pcwd_device = NULL;
return retval;
}
usb_pcwd_device = NULL;
return retval;
}
@@
-725,7
+723,7
@@
static void usb_pcwd_disconnect(struct usb_interface *interface)
struct usb_pcwd_private *usb_pcwd;
/* prevent races with open() */
struct usb_pcwd_private *usb_pcwd;
/* prevent races with open() */
-
mutex_lock(&disconnect_mutex
);
+
down (&disconnect_sem
);
usb_pcwd = usb_get_intfdata (interface);
usb_set_intfdata (interface, NULL);
usb_pcwd = usb_get_intfdata (interface);
usb_set_intfdata (interface, NULL);
@@
-751,7
+749,7
@@
static void usb_pcwd_disconnect(struct usb_interface *interface)
cards_found--;
cards_found--;
-
mutex_unlock(&disconnect_mutex
);
+
up (&disconnect_sem
);
printk(KERN_INFO PFX "USB PC Watchdog disconnected\n");
}
printk(KERN_INFO PFX "USB PC Watchdog disconnected\n");
}