diff options
author | joe <joe@FreeBSD.org> | 2002-02-11 03:15:08 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2002-02-11 03:15:08 +0000 |
commit | b906b978d1ab248bd48ad073c6e37db33517e5e2 (patch) | |
tree | fe6373a2e1e29b56f71161c3b53ae9d88c85539e /sys | |
parent | db0b5e6c419c13cec0dd1b6980a6e603aa333696 (diff) | |
download | FreeBSD-src-b906b978d1ab248bd48ad073c6e37db33517e5e2.zip FreeBSD-src-b906b978d1ab248bd48ad073c6e37db33517e5e2.tar.gz |
Merge from NetBSD: revs 1.55 and 1.56
Original NetBSD logs:
----------------------------
revision 1.56
date: 2001/12/03 01:47:12; author: augustss; lines: +5 -3
Handle vendor/product lookup with a common routine.
----------------------------
revision 1.55
date: 2001/12/02 23:25:25; author: augustss; lines: +8 -1
Add a subroutine to search for a vendor/product pair.
----------------------------
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/usbdi.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index 7a184e7..839832c 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -186,6 +186,15 @@ usb_endpoint_descriptor_t *usbd_get_endpoint_descriptor usbd_status usbd_reload_device_desc(usbd_device_handle); +struct usb_devno { + u_int16_t ud_vendor; + u_int16_t ud_product; +}; +const struct usb_devno *usb_match_device(const struct usb_devno *tbl, + u_int nentries, u_int sz, u_int16_t vendor, u_int16_t product); +#define usb_lookup(tbl, vendor, product) \ + usb_match_device((const struct usb_devno *)(tbl), sizeof (tbl) / sizeof ((tbl)[0]), sizeof ((tbl)[0]), (vendor), (product)) + /* NetBSD attachment information */ /* Attach data */ |