diff options
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 41d1a644c9d4..eb282b581546 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -287,15 +287,14 @@ struct usb_bus { | |||
287 | 287 | ||
288 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ | 288 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ |
289 | 289 | ||
290 | struct class_device class_dev; /* class device for this bus */ | 290 | struct class_device *class_dev; /* class device for this bus */ |
291 | struct kref kref; /* handles reference counting this bus */ | ||
291 | void (*release)(struct usb_bus *bus); /* function to destroy this bus's memory */ | 292 | void (*release)(struct usb_bus *bus); /* function to destroy this bus's memory */ |
292 | #if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE) | 293 | #if defined(CONFIG_USB_MON) |
293 | struct mon_bus *mon_bus; /* non-null when associated */ | 294 | struct mon_bus *mon_bus; /* non-null when associated */ |
294 | int monitored; /* non-zero when monitored */ | 295 | int monitored; /* non-zero when monitored */ |
295 | #endif | 296 | #endif |
296 | }; | 297 | }; |
297 | #define to_usb_bus(d) container_of(d, struct usb_bus, class_dev) | ||
298 | |||
299 | 298 | ||
300 | /* -------------------------------------------------------------------------- */ | 299 | /* -------------------------------------------------------------------------- */ |
301 | 300 | ||
@@ -796,6 +795,10 @@ typedef void (*usb_complete_t)(struct urb *, struct pt_regs *); | |||
796 | * of the iso_frame_desc array, and the number of errors is reported in | 795 | * of the iso_frame_desc array, and the number of errors is reported in |
797 | * error_count. Completion callbacks for ISO transfers will normally | 796 | * error_count. Completion callbacks for ISO transfers will normally |
798 | * (re)submit URBs to ensure a constant transfer rate. | 797 | * (re)submit URBs to ensure a constant transfer rate. |
798 | * | ||
799 | * Note that even fields marked "public" should not be touched by the driver | ||
800 | * when the urb is owned by the hcd, that is, since the call to | ||
801 | * usb_submit_urb() till the entry into the completion routine. | ||
799 | */ | 802 | */ |
800 | struct urb | 803 | struct urb |
801 | { | 804 | { |
@@ -803,12 +806,12 @@ struct urb | |||
803 | struct kref kref; /* reference count of the URB */ | 806 | struct kref kref; /* reference count of the URB */ |
804 | spinlock_t lock; /* lock for the URB */ | 807 | spinlock_t lock; /* lock for the URB */ |
805 | void *hcpriv; /* private data for host controller */ | 808 | void *hcpriv; /* private data for host controller */ |
806 | struct list_head urb_list; /* list pointer to all active urbs */ | ||
807 | int bandwidth; /* bandwidth for INT/ISO request */ | 809 | int bandwidth; /* bandwidth for INT/ISO request */ |
808 | atomic_t use_count; /* concurrent submissions counter */ | 810 | atomic_t use_count; /* concurrent submissions counter */ |
809 | u8 reject; /* submissions will fail */ | 811 | u8 reject; /* submissions will fail */ |
810 | 812 | ||
811 | /* public, documented fields in the urb that can be used by drivers */ | 813 | /* public, documented fields in the urb that can be used by drivers */ |
814 | struct list_head urb_list; /* list head for use by the urb owner */ | ||
812 | struct usb_device *dev; /* (in) pointer to associated device */ | 815 | struct usb_device *dev; /* (in) pointer to associated device */ |
813 | unsigned int pipe; /* (in) pipe information */ | 816 | unsigned int pipe; /* (in) pipe information */ |
814 | int status; /* (return) non-ISO status */ | 817 | int status; /* (return) non-ISO status */ |