summaryrefslogtreecommitdiff
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-07-26 00:11:46 +0200
committerThomas Gleixner <tglx@linutronix.de>2009-07-27 13:36:16 +0200
commit97dd538e3998fcada84d8106a4d974fdab729cb1 (patch)
treecb7caff098de481a713d45c70cb977a16ce2087c /include/linux/usb.h
parent37be6ed9bf5d50cf2bfa07a4ff8b505e428e6a4c (diff)
downloadlwn-97dd538e3998fcada84d8106a4d974fdab729cb1.tar.gz
lwn-97dd538e3998fcada84d8106a4d974fdab729cb1.zip
drivers/base: Convert dev->sem to mutex
The semaphore is used as mutex so make it a mutex. Clean up all users outside of drivers/base as well. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index b1e3c2fbfe11..ee0c481c09da 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -529,9 +529,9 @@ extern struct usb_device *usb_get_dev(struct usb_device *dev);
extern void usb_put_dev(struct usb_device *dev);
/* USB device locking */
-#define usb_lock_device(udev) down(&(udev)->dev.sem)
-#define usb_unlock_device(udev) up(&(udev)->dev.sem)
-#define usb_trylock_device(udev) down_trylock(&(udev)->dev.sem)
+#define usb_lock_device(udev) mutex_lock(&(udev)->dev.mutex)
+#define usb_unlock_device(udev) mutex_unlock(&(udev)->dev.mutex)
+#define usb_trylock_device(udev) mutex_trylock(&(udev)->dev.mutex)
extern int usb_lock_device_for_reset(struct usb_device *udev,
const struct usb_interface *iface);