diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2002-12-26 19:33:42 -0800 |
|---|---|---|
| committer | Vojtech Pavlik <vojtech@suse.cz> | 2002-12-26 19:33:42 -0800 |
| commit | 9e314023895e31d1decb8e55505bcb852eb7507b (patch) | |
| tree | 37f5612e6aa6a4be084ed77a9696ad856ca8533b /include/linux | |
| parent | e95cd2476de0fa378588770cbb059728fbf3eb13 (diff) | |
[PATCH] USB: remove private_data pointer from struct usb_interface, as it shouldn't be used anymore
Also added usb_get_intfdata() and usb_set_intfdata() functions to set the
struct usb_interface private pointer easier.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/usb.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index b1d92b8c585f..e0d1269dc779 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -111,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 |
