diff options
author | hselasky <hselasky@FreeBSD.org> | 2011-09-10 15:55:36 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2011-09-10 15:55:36 +0000 |
commit | 51e6bf127c1adb88842f4c0c83102e00d45f2731 (patch) | |
tree | 7724f0fc7a7c9bc3852ede5b8fd465396407b487 /sys/dev/usb/usb_dynamic.c | |
parent | 0f94bf5e3e3273f05320c01e355014a79b8d8c1f (diff) | |
download | FreeBSD-src-51e6bf127c1adb88842f4c0c83102e00d45f2731.zip FreeBSD-src-51e6bf127c1adb88842f4c0c83102e00d45f2731.tar.gz |
Refactor auto-quirk solution so that we break as few external
drivers as possible.
PR: usb/160299
Approved by: re (kib)
Suggested by: rwatson
MFC after: 0 days
Diffstat (limited to 'sys/dev/usb/usb_dynamic.c')
-rw-r--r-- | sys/dev/usb/usb_dynamic.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sys/dev/usb/usb_dynamic.c b/sys/dev/usb/usb_dynamic.c index 765ee4f..1358b30 100644 --- a/sys/dev/usb/usb_dynamic.c +++ b/sys/dev/usb/usb_dynamic.c @@ -50,12 +50,12 @@ #include <dev/usb/usb_process.h> #include <dev/usb/usb_device.h> #include <dev/usb/usb_dynamic.h> -#include <dev/usb/quirk/usb_quirk.h> /* function prototypes */ static usb_handle_req_t usb_temp_get_desc_w; static usb_temp_setup_by_index_t usb_temp_setup_by_index_w; static usb_temp_unsetup_t usb_temp_unsetup_w; +static usb_test_quirk_t usb_test_quirk_w; static usb_quirk_ioctl_t usb_quirk_ioctl_w; /* global variables */ @@ -72,19 +72,9 @@ usb_temp_setup_by_index_w(struct usb_device *udev, uint16_t index) return (USB_ERR_INVAL); } -uint8_t +static uint8_t usb_test_quirk_w(const struct usbd_lookup_info *info, uint16_t quirk) { - uint8_t x; - - if (quirk == UQ_NONE) - return (0); /* no match */ - - for (x = 0; x != USB_MAX_AUTO_QUIRK; x++) { - if (info->autoQuirk[x] == quirk) - return (1); /* match */ - } - return (0); /* no match */ } |