2004-10-07 23:12:04

by Hanna Linder

[permalink] [raw]
Subject: [PATCH 2.6][8/12] pmac_pci.c replace pci_find_device with pci_get_device


As pci_find_device is going away I've replaced it with pci_get_device.
If someone with a PPC system could test it I would appreciate it.

Thanks.

Hanna Linder
IBM Linux Technology Center

Signed-off-by: Hanna Linder <[email protected]>

---
diff -Nrup linux-2.6.9-rc3-mm3cln/arch/ppc/platforms/pmac_pci.c linux-2.6.9-rc3-mm3patch/arch/ppc/platforms/pmac_pci.c
--- linux-2.6.9-rc3-mm3cln/arch/ppc/platforms/pmac_pci.c 2004-10-07 15:54:30.000000000 -0700
+++ linux-2.6.9-rc3-mm3patch/arch/ppc/platforms/pmac_pci.c 2004-10-07 16:01:41.000000000 -0700
@@ -889,7 +889,7 @@ pcibios_fixup_OF_interrupts(void)
* should find the device node and apply the interrupt
* obtained from the OF device-tree
*/
- while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+ for_each_pci_dev(dev) {
struct device_node *node;
node = pci_device_to_OF_node(dev);
/* this is the node, see if it has interrupts */
@@ -989,7 +989,7 @@ pmac_pcibios_after_init(void)
*
* -- BenH
*/
- while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+ for_each_pci_dev(dev) {
if ((dev->class >> 16) == PCI_BASE_CLASS_STORAGE)
pci_enable_device(dev);
}