diff options
author | Josef Karthauser <joe@FreeBSD.org> | 2002-04-07 12:32:55 +0000 |
---|---|---|
committer | Josef Karthauser <joe@FreeBSD.org> | 2002-04-07 12:32:55 +0000 |
commit | 59b1ccec7905d87e74ae2e0db8005d3008122e41 (patch) | |
tree | c4281b5d80275f740d1741a8d7ff0f94638c7f95 /sys/dev/usb/usbdi.c | |
parent | f7f4bdbbcb944b2132e6738d8b0da35234c6be34 (diff) | |
download | src-59b1ccec7905d87e74ae2e0db8005d3008122e41.tar.gz src-59b1ccec7905d87e74ae2e0db8005d3008122e41.zip |
Move a function to a different place in the source so that we match
NetBSD.
Notes
Notes:
svn path=/head/; revision=94081
Diffstat (limited to 'sys/dev/usb/usbdi.c')
-rw-r--r-- | sys/dev/usb/usbdi.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 4659dd81b3d7..99e61f43ae0a 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.c,v 1.88 2001/11/22 04:31:01 augustss Exp $ */ +/* $NetBSD: usbdi.c,v 1.89 2001/12/02 23:25:25 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -1083,22 +1083,6 @@ usbd_get_endpoint_descriptor(usbd_interface_handle iface, u_int8_t address) } /* - * Search for a vendor/product pair in an array. The item size is - * given as an argument. - */ -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) -{ - while (nentries-- > 0) { - if (tbl->ud_vendor == vendor && tbl->ud_product == product) - return (tbl); - tbl = (const struct usb_devno *)((const char *)tbl + sz); - } - return (NULL); -} - -/* * usbd_ratecheck() can limit the number of error messages that occurs. * When a device is unplugged it may take up to 0.25s for the hub driver * to notice it. If the driver continuosly tries to do I/O operations @@ -1115,6 +1099,22 @@ usbd_ratecheck(struct timeval *last) return (1); } +/* + * Search for a vendor/product pair in an array. The item size is + * given as an argument. + */ +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) +{ + while (nentries-- > 0) { + if (tbl->ud_vendor == vendor && tbl->ud_product == product) + return (tbl); + tbl = (const struct usb_devno *)((const char *)tbl + sz); + } + return (NULL); +} + #if defined(__FreeBSD__) int usbd_driver_load(module_t mod, int what, void *arg) |