diff options
| author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2011-06-24 22:01:56 +0000 |
|---|---|---|
| committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2011-06-24 22:01:56 +0000 |
| commit | 9c916c627f1101d584cbf35444fe32a2bc16c07f (patch) | |
| tree | 074fc8f451b606050e9f82f5fab340d930ea091d /sys/dev/usb/input/uep.c | |
| parent | 0dbe859d2fdfda3291d5086e66e51c14b2a2dd44 (diff) | |
Notes
Diffstat (limited to 'sys/dev/usb/input/uep.c')
| -rw-r--r-- | sys/dev/usb/input/uep.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sys/dev/usb/input/uep.c b/sys/dev/usb/input/uep.c index 048452d84b18..e90298bd1d0c 100644 --- a/sys/dev/usb/input/uep.c +++ b/sys/dev/usb/input/uep.c @@ -288,6 +288,12 @@ static const struct usb_config uep_config[UEP_N_TRANSFER] = { }, }; +static const STRUCT_USB_HOST_ID uep_devs[] = { + {USB_VPI(USB_VENDOR_EGALAX, USB_PRODUCT_EGALAX_TPANEL, 0)}, + {USB_VPI(USB_VENDOR_EGALAX, USB_PRODUCT_EGALAX_TPANEL2, 0)}, + {USB_VPI(USB_VENDOR_EGALAX2, USB_PRODUCT_EGALAX2_TPANEL, 0)}, +}; + static int uep_probe(device_t dev) { @@ -295,17 +301,12 @@ uep_probe(device_t dev) if (uaa->usb_mode != USB_MODE_HOST) return (ENXIO); + if (uaa->info.bConfigIndex != 0) + return (ENXIO); + if (uaa->info.bIfaceIndex != 0) + return (ENXIO); - if ((uaa->info.idVendor == USB_VENDOR_EGALAX) && - ((uaa->info.idProduct == USB_PRODUCT_EGALAX_TPANEL) || - (uaa->info.idProduct == USB_PRODUCT_EGALAX_TPANEL2))) - return (BUS_PROBE_SPECIFIC); - - if ((uaa->info.idVendor == USB_VENDOR_EGALAX2) && - (uaa->info.idProduct == USB_PRODUCT_EGALAX2_TPANEL)) - return (BUS_PROBE_SPECIFIC); - - return (ENXIO); + return (usbd_lookup_id_by_uaa(uep_devs, sizeof(uep_devs), uaa)); } static int |
