aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2005-05-16 06:58:43 +0000
committerWarner Losh <imp@FreeBSD.org>2005-05-16 06:58:43 +0000
commitce86397a9828b523bce5538102c07ee99f607822 (patch)
tree4b0ed9c64ac1eb73c4e619076e6d485133933cd1 /sys
parenta8e72fd37a198f0ad4360840adcde5327b3d883d (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/usbdi.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h
index 368014d4ce56..902b1bd47627 100644
--- a/sys/dev/usb/usbdi.h
+++ b/sys/dev/usb/usbdi.h
@@ -275,6 +275,21 @@ struct usb_attach_arg {
#if defined(__FreeBSD__)
int usbd_driver_load(module_t mod, int what, void *arg);
+
+static inline int
+usb_get_port(device_t dev)
+{
+ struct usb_attach_arg *uap = device_get_ivars(dev);
+ return (uap->port);
+}
+
+static inline struct usbd_interface *
+usb_get_iface(device_t dev)
+{
+ struct usb_attach_arg *uap = device_get_ivars(dev);
+ return (uap->iface);
+}
+
#endif
/* XXX Perhaps USB should have its own levels? */