2004-10-04 23:20:34

by Hanna Linder

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


As pci_find_device is going away I have replaced this call with pci_get_device.
If someone with a PPC system could verify it I would appreciate it.

Hanna Linder
IBM Linux Technology Center

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

----
diff -Nrup linux-2.6.9-rc3-mm2cln/arch/ppc/platforms/chrp_pci.c linux-2.6.9-rc3-mm2patch/arch/ppc/platforms/chrp_pci.c
--- linux-2.6.9-rc3-mm2cln/arch/ppc/platforms/chrp_pci.c 2004-09-29 20:06:04.000000000 -0700
+++ linux-2.6.9-rc3-mm2patch/arch/ppc/platforms/chrp_pci.c 2004-10-04 16:07:45.279128992 -0700
@@ -158,7 +158,7 @@ chrp_pcibios_fixup(void)
struct device_node *np;

/* PCI interrupts are controlled by the OpenPIC */
- while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+ while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
np = pci_device_to_OF_node(dev);
if ((np != 0) && (np->n_intrs > 0) && (np->intrs[0].line != 0))
dev->irq = np->intrs[0].line;



2004-10-06 23:31:59

by Hanna Linder

[permalink] [raw]
Subject: Re: [PATCH 2.6] [2/12] chrp_pci.c replace pci_find_device with pci_get_device

--On Monday, October 04, 2004 04:21:12 PM -0700 Hanna Linder <[email protected]> wrote:

>
> As pci_find_device is going away I have replaced this call with pci_get_device.
> If someone with a PPC system could verify it I would appreciate it.
>
> Hanna Linder
> IBM Linux Technology Center
>
> Signed-off-by: Hanna Linder <[email protected]>

Reroll this patch with new macro

diff -Nrup linux-2.6.9-rc3-mm2cln/arch/ppc/platforms/chrp_pci.c linux-2.6.9-rc3-mm2patch/arch/ppc/platforms/chrp_pci.c
--- linux-2.6.9-rc3-mm2cln/arch/ppc/platforms/chrp_pci.c 2004-09-29 20:06:04.000000000 -0700
+++ linux-2.6.9-rc3-mm2patch/arch/ppc/platforms/chrp_pci.c 2004-10-06 16:15:44.000000000 -0700
@@ -158,7 +158,7 @@ chrp_pcibios_fixup(void)
struct device_node *np;

/* PCI interrupts are controlled by the OpenPIC */
- while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+ for_each_pci_dev(dev) {
np = pci_device_to_OF_node(dev);
if ((np != 0) && (np->n_intrs > 0) && (np->intrs[0].line != 0))
dev->irq = np->intrs[0].line;