aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-01-29 15:39:02 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-21 12:37:30 -0400
commit3142788b7967ccfd2f1813ee9e11aeb1e1cf7de2 (patch)
tree292a6e3a21e237789c91a8d0ccd021321990a265 /drivers/usb
parent190e8370b8033f746db5289e9324174564a6f5a7 (diff)
drivers/base: Convert dev->sem to mutex
The semaphore is semantically a mutex. Convert it to a real mutex and fix up a few places where code was relying on semaphore.h to be included by device.h, as well as the users of the trylock function, as that value is now reversed. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 397b678f1c47..5ae14f6c1e7a 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -573,7 +573,7 @@ int usb_lock_device_for_reset(struct usb_device *udev,
573 iface->condition == USB_INTERFACE_UNBOUND)) 573 iface->condition == USB_INTERFACE_UNBOUND))
574 return -EINTR; 574 return -EINTR;
575 575
576 while (usb_trylock_device(udev) != 0) { 576 while (!usb_trylock_device(udev)) {
577 577
578 /* If we can't acquire the lock after waiting one second, 578 /* If we can't acquire the lock after waiting one second,
579 * we're probably deadlocked */ 579 * we're probably deadlocked */