aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 2714814ab66c..46dc0421d19e 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -329,8 +329,6 @@ struct usb_device {
329 struct usb_tt *tt; /* low/full speed dev, highspeed hub */ 329 struct usb_tt *tt; /* low/full speed dev, highspeed hub */
330 int ttport; /* device port on that tt hub */ 330 int ttport; /* device port on that tt hub */
331 331
332 struct semaphore serialize;
333
334 unsigned int toggle[2]; /* one bit for each endpoint 332 unsigned int toggle[2]; /* one bit for each endpoint
335 * ([0] = IN, [1] = OUT) */ 333 * ([0] = IN, [1] = OUT) */
336 334
@@ -377,11 +375,12 @@ struct usb_device {
377extern struct usb_device *usb_get_dev(struct usb_device *dev); 375extern struct usb_device *usb_get_dev(struct usb_device *dev);
378extern void usb_put_dev(struct usb_device *dev); 376extern void usb_put_dev(struct usb_device *dev);
379 377
380extern void usb_lock_device(struct usb_device *udev); 378/* USB device locking */
381extern int usb_trylock_device(struct usb_device *udev); 379#define usb_lock_device(udev) down(&(udev)->dev.sem)
380#define usb_unlock_device(udev) up(&(udev)->dev.sem)
381#define usb_trylock_device(udev) down_trylock(&(udev)->dev.sem)
382extern int usb_lock_device_for_reset(struct usb_device *udev, 382extern int usb_lock_device_for_reset(struct usb_device *udev,
383 struct usb_interface *iface); 383 struct usb_interface *iface);
384extern void usb_unlock_device(struct usb_device *udev);
385 384
386/* USB port reset for device reinitialization */ 385/* USB port reset for device reinitialization */
387extern int usb_reset_device(struct usb_device *dev); 386extern int usb_reset_device(struct usb_device *dev);