aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/iseries/pci.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2006-05-19 16:48:47 +1000
committerPaul Mackerras <paulus@samba.org>2006-05-24 16:08:56 +1000
commit96ff6afaf1c2fdd118139095dea66c0910379780 (patch)
tree5364530523d40789b549edc66e02e47b04932c9a /arch/powerpc/platforms/iseries/pci.c
parent0d177df15d12926dc2ef7c814f317f02de52ce17 (diff)
[PATCH] powerpc: remove iSeries_Global_Device_List
We can now scan the list of device nodes instead. This also allows us to remove the Device_list member of struct pci_dn. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/iseries/pci.c')
-rw-r--r--arch/powerpc/platforms/iseries/pci.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index 9d571e74909..5bc08d4eef4 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -50,8 +50,6 @@
*/
static struct device_node *find_Device_Node(int bus, int devfn);
-LIST_HEAD(iSeries_Global_Device_List);
-
static int Pci_Retry_Max = 3; /* Only retry 3 times */
static int Pci_Error_Flag = 1; /* Set Retry Error on. */
@@ -245,8 +243,6 @@ void iSeries_pcibios_init(void)
pdn->bussubno = *busp;
pdn->Irq = irq;
pdn->LogicalSlot = *lsn;
- list_add_tail(&pdn->Device_List,
- &iSeries_Global_Device_List);
}
}
}
@@ -338,11 +334,13 @@ EXPORT_SYMBOL(iSeries_memcpy_fromio);
*/
static struct device_node *find_Device_Node(int bus, int devfn)
{
- struct pci_dn *pdn;
+ struct device_node *node;
+
+ for (node = NULL; (node = of_find_all_nodes(node)); ) {
+ struct pci_dn *pdn = PCI_DN(node);
- list_for_each_entry(pdn, &iSeries_Global_Device_List, Device_List) {
- if ((bus == pdn->busno) && (devfn == pdn->devfn))
- return pdn->node;
+ if (pdn && (bus == pdn->busno) && (devfn == pdn->devfn))
+ return node;
}
return NULL;
}