diff options
author | imp <imp@FreeBSD.org> | 2001-01-21 08:09:00 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2001-01-21 08:09:00 +0000 |
commit | 83ca21a6607ff254bcfa6b28afe8660f7629eb39 (patch) | |
tree | defb593a7bcadb6598244ece15b8a682ff754772 | |
parent | 0f92919216bf30ceb87e24bc4dd8e9aa5c539e12 (diff) | |
download | FreeBSD-src-83ca21a6607ff254bcfa6b28afe8660f7629eb39.zip FreeBSD-src-83ca21a6607ff254bcfa6b28afe8660f7629eb39.tar.gz |
Convert the vendor/product cis strings to an array of CIS entries. This
allows us to use the PCCARD_CIS #defines generated to distinguish cards
that don't have a Manufacturer and OEM.
-rw-r--r-- | sys/dev/pccard/pccard.c | 9 | ||||
-rw-r--r-- | sys/dev/pccard/pccardvar.h | 3 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c index 53aaca0..2b67922 100644 --- a/sys/dev/pccard/pccard.c +++ b/sys/dev/pccard/pccard.c @@ -262,12 +262,13 @@ pccard_product_lookup(device_t dev, const struct pccard_product *tab, matches = 0; if (matches && fcn != ent->pp_expfunc) matches = 0; - if (matches && ent->pp_vendor_str && - strcmp(ent->pp_vendor_str, vendorstr) != 0) + if (matches && ent->pp_cis[0] && + strcmp(ent->pp_cis[0], vendorstr) != 0) matches = 0; - if (matches && ent->pp_product_str && - strcmp(ent->pp_product_str, prodstr) != 0) + if (matches && ent->pp_cis[1] && + strcmp(ent->pp_cis[1], prodstr) != 0) matches = 0; + /* XXX need to match cis[2] and cis[3] also XXX */ if (matchfn != NULL) matches = (*matchfn)(dev, ent, matches); if (matches) diff --git a/sys/dev/pccard/pccardvar.h b/sys/dev/pccard/pccardvar.h index e5117cc..7e66e62 100644 --- a/sys/dev/pccard/pccardvar.h +++ b/sys/dev/pccard/pccardvar.h @@ -214,8 +214,7 @@ struct pccard_product { #define PCCARD_PRODUCT_ANY ((u_int32_t) -1) u_int32_t pp_product; int pp_expfunc; - const char *pp_vendor_str; /* NULL to not match */ - const char *pp_product_str; /* NULL to not match */ + const char *pp_cis[4]; }; typedef int (*pccard_product_match_fn) (device_t dev, |