Use the new USB_PRODUCT_ANY match.
This commit is contained in:
parent
bfc3660fb1
commit
213baeaad6
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: umass_quirks.c,v 1.5 2001/12/24 19:24:33 augustss Exp $ */
|
||||
/* $NetBSD: umass_quirks.c,v 1.6 2001/12/24 21:36:54 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -183,23 +183,8 @@ Static const struct umass_quirk umass_quirks[] = {
|
|||
const struct umass_quirk *
|
||||
umass_lookup(u_int16_t vendor, u_int16_t product)
|
||||
{
|
||||
const struct usb_devno *udev;
|
||||
int n, i;
|
||||
|
||||
n = sizeof(umass_quirks) / sizeof(umass_quirks[0]);
|
||||
|
||||
udev = usb_match_device((const struct usb_devno *)umass_quirks, n,
|
||||
sizeof(struct umass_quirk), vendor, product);
|
||||
if (udev != NULL)
|
||||
return ((const struct umass_quirk *)udev);
|
||||
|
||||
for (i = 0 ; i < n ; i++) {
|
||||
if (umass_quirks[i].uq_dev.ud_vendor == vendor &&
|
||||
umass_quirks[i].uq_dev.ud_product == USB_PRODUCT_ANY)
|
||||
return (&umass_quirks[i]);
|
||||
}
|
||||
|
||||
return (NULL);
|
||||
return ((const struct umass_quirk *)
|
||||
usb_lookup(umass_quirks, vendor, product));
|
||||
}
|
||||
|
||||
Static usbd_status
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: umass_quirks.h,v 1.1 2001/12/17 12:16:15 gehenna Exp $ */
|
||||
/* $NetBSD: umass_quirks.h,v 1.2 2001/12/24 21:36:54 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -45,7 +45,6 @@ typedef void (*umass_fixup_quirk)(struct umass_softc *);
|
|||
|
||||
struct umass_quirk {
|
||||
struct usb_devno uq_dev;
|
||||
#define USB_PRODUCT_ANY 0xffff /* XXX */
|
||||
|
||||
u_int8_t uq_wire;
|
||||
u_int8_t uq_cmd;
|
||||
|
|
Loading…
Reference in New Issue