<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">ChangeSet 1.1287, 2003/06/04 17:40:32-07:00, greg@kroah.com

[PATCH] PCI: remove usage of pci_for_each_dev() in arch/ppc/kernel/pci.c


 arch/ppc/kernel/pci.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


diff -Nru a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c
--- a/arch/ppc/kernel/pci.c	Wed Jun  4 18:07:33 2003
+++ b/arch/ppc/kernel/pci.c	Wed Jun  4 18:07:33 2003
@@ -548,12 +548,12 @@
 static void __init
 pcibios_allocate_resources(int pass)
 {
-	struct pci_dev *dev;
+	struct pci_dev *dev = NULL;
 	int idx, disabled;
 	u16 command;
 	struct resource *r;
 
-	pci_for_each_dev(dev) {
+	while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
 		pci_read_config_word(dev, PCI_COMMAND, &amp;command);
 		for (idx = 0; idx &lt; 6; idx++) {
 			r = &amp;dev-&gt;resource[idx];
@@ -586,11 +586,11 @@
 static void __init
 pcibios_assign_resources(void)
 {
-	struct pci_dev *dev;
+	struct pci_dev *dev = NULL;
 	int idx;
 	struct resource *r;
 
-	pci_for_each_dev(dev) {
+	while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
 		int class = dev-&gt;class &gt;&gt; 8;
 
 		/* Don't touch classless devices and host bridges */
@@ -881,7 +881,7 @@
 {
 	unsigned int *reg;
 	struct pci_controller* hose;
-	struct pci_dev* dev;
+	struct pci_dev* dev = NULL;
 		
 	if (!have_of)
 		return -ENODEV;
@@ -905,7 +905,7 @@
 	 */
 	if (!pci_to_OF_bus_map)
 		return 0;
-	pci_for_each_dev(dev) {
+	while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
 		if (pci_to_OF_bus_map[dev-&gt;bus-&gt;number] != *bus)
 			continue;
 		if (dev-&gt;devfn != *devfn)
</pre></body></html>