Re: [-mm PATCH] remove use of pci_find_device in watchdog driver for Intel 6300ESB chipset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux