diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2010-12-15 14:55:05 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2010-12-15 14:55:05 +0000 |
commit | 4da43c5d8b8ae45176399f922936c2accfc2091a (patch) | |
tree | e12e3698a9c1945ce1404b16575afb76b1397a1b /sys/dev/usb/uticom.c | |
parent | cbe4baf975e72b6beaffa0e215bc7aed74e1b801 (diff) |
- attach to the startech ICUSB232X, though only the first port can be used
on this multiport device.
ok jsg@
Diffstat (limited to 'sys/dev/usb/uticom.c')
-rw-r--r-- | sys/dev/usb/uticom.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/usb/uticom.c b/sys/dev/usb/uticom.c index 3419cc14ae2..f88104ec72a 100644 --- a/sys/dev/usb/uticom.c +++ b/sys/dev/usb/uticom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uticom.c,v 1.8 2010/12/15 11:09:03 jsg Exp $ */ +/* $OpenBSD: uticom.c,v 1.9 2010/12/15 14:55:04 jasper Exp $ */ /* * Copyright (c) 2005 Dmitry Komissaroff <dxi@mail.ru>. * @@ -189,6 +189,11 @@ const struct cfattach uticom_ca = { uticom_activate, }; +static const struct usb_devno uticom_devs[] = { + { USB_VENDOR_TI, USB_PRODUCT_TI_TUSB3410 }, + { USB_VENDOR_STARTECH, USB_PRODUCT_STARTECH_ICUSB232X } +}; + int uticom_match(struct device *parent, void *match, void *aux) { @@ -197,10 +202,8 @@ uticom_match(struct device *parent, void *match, void *aux) if (uaa->iface != NULL) return (UMATCH_NONE); - if (uaa->vendor == USB_VENDOR_TI && - uaa->product == USB_PRODUCT_TI_TUSB3410) - return (UMATCH_VENDOR_PRODUCT); - return (0); + return (usb_lookup(uticom_devs, uaa->vendor, uaa->product) != NULL ? + UMATCH_VENDOR_PRODUCT : UMATCH_NONE); } void |