lkml.org 
[lkml]   [2005]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [-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/

\
 
 \ /
  Last update: 2005-08-16 01:19    [W:1.073 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site