summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2002-12-26 21:33:23 -0800
committerGreg Kroah-Hartman <greg@kroah.com>2002-12-26 21:33:23 -0800
commit8d244aa7ef9a07c2fb52f4bf873944d788c78bf6 (patch)
tree45248e1b08bcc05bcdc3d9d66d8e0ce2b4ac3881 /include/linux
parent99a6e15b856ffd9a91f6d85dfaa09d3a38857d7f (diff)
parent3ff3774fb5f23a02bb1da3b7ac276230a073d834 (diff)
Merge kroah.com:/home/linux/linux/BK/bleeding-2.5
into kroah.com:/home/linux/linux/BK/gregkh-2.5
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 88557d5957a7..e0d1269dc779 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -28,14 +28,6 @@ static __inline__ void wait_ms(unsigned int ms)
mdelay(ms);
}
-/*
- * USB device number allocation bitmap. There's one bitmap
- * per USB tree.
- */
-struct usb_devmap {
- unsigned long devicemap[128 / (8*sizeof(unsigned long))];
-};
-
struct usb_device;
/*-------------------------------------------------------------------------*/
@@ -119,12 +111,21 @@ struct usb_interface {
struct usb_driver *driver; /* driver */
kdev_t kdev; /* node this interface is bound to */
struct device dev; /* interface specific device info */
- void *private_data;
};
#define to_usb_interface(d) container_of(d, struct usb_interface, dev)
#define interface_to_usbdev(intf) \
container_of(intf->dev.parent, struct usb_device, dev)
+static inline void *usb_get_intfdata (struct usb_interface *intf)
+{
+ return dev_get_drvdata (&intf->dev);
+}
+
+static inline void usb_set_intfdata (struct usb_interface *intf, void *data)
+{
+ return dev_set_drvdata (&intf->dev, data);
+}
+
/* USB_DT_CONFIG: Configuration descriptor information.
*
* USB_DT_OTHER_SPEED_CONFIG is the same descriptor, except that the
@@ -159,10 +160,16 @@ int __usb_get_extra_descriptor(char *buffer, unsigned size,
struct usb_operations;
+/* USB device number allocation bitmap */
+struct usb_devmap {
+ unsigned long devicemap[128 / (8*sizeof(unsigned long))];
+};
+
/*
- * Allocated per bus we have
+ * Allocated per bus (tree of devices) we have:
*/
struct usb_bus {
+ struct device *controller; /* host/master side hardware */
int busnum; /* Bus number (in order of reg) */
char *bus_name; /* stable id (PCI slot_name etc) */