Messages in this thread | | | Date | Tue, 16 Aug 2005 01:14:27 +0200 | From | David Härdeman <> | Subject | Re: [-mm PATCH] remove use of pci_find_device in watchdog driver for Intel 6300ESB chipset |
| |
On Mon, Aug 15, 2005 at 02:30:15PM -0700, Naveen Gupta wrote: [...} >- while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { >- if (pci_match_id(esb_pci_tbl, dev)) { >- esb_pci = dev; >- break; >- } >- } >+ while (ids->vendor && ids->device) { >+ if ((dev = pci_get_device(ids->vendor, ids->device, dev)) != NULL) { >+ esb_pci = dev; >+ break; >+ } >+ ids++; >+ }
I'm certainly not sure about this, but the proposed while loop looks a bit unconventional, wouldn't something like:
for_each_pci_dev(dev) if (pci_match_id(esb_pci_tbl, dev)) { esb_pci = dev; break; } }
be better?
//David - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |