From ab4435235ae95cbbcd4a60e273a38d520eaa0244 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 7 Oct 2002 09:21:14 +0000 Subject: - remove gc hack that tried to fix my bug (which i fixed in last commit) - simplify subids match; explay why we can only test for nb==4 --- pciusb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pciusb.c b/pciusb.c index 6211dba..6fb04e0 100644 --- a/pciusb.c +++ b/pciusb.c @@ -107,9 +107,6 @@ extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciu continue; // skip since already found with sub ids if (vendor != e->vendor || device != e->device) continue; // main ids differ - if (nb < 4 && e->module) - continue; // already found a match and this match isn't a subid one (so it's not potentially more precise) - if (nb == 4 && e->subvendor == 0xffff && e->subdevice == 0xffff && !no_subid) { pciusb_free(entries); fh_close(&f); @@ -128,8 +125,9 @@ extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciu ifree(e->text); /* usb.c set it so that we display something when usbtable doesn't refer that hw*/ e->text = strndup(q+2, strlen(q)-4); - if (e->subvendor != 0xffff && e->subdevice != 0xffff && - subdevice == e->subdevice && subvendor == e->subvendor) + /* if subids read on pcitable line, we know that subids matches : + (see "subids differ" test above) */ + if (nb==4) e->already_found = 1; } } -- cgit v1.2.1