aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-12-06 09:46:40 -0500
committerPaul Mackerras <paulus@samba.org>2007-12-10 21:42:16 -0500
commit9103eb7d3a78ec6e49e49412c45e3b0a2589cbce (patch)
tree4c8231260bcc4cd34cf4080d0f46518f24311e70
parent7211991fa306de1363e3a843f3ed25634c554eec (diff)
[POWERPC] iSeries: Move find_Device_Node to avoid a forward declaration
Also remove another unnecessary forward declaration. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/platforms/iseries/pci.c39
1 files changed, 16 insertions, 23 deletions
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index a74d1e1966d..e4e6ae0acd4 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -45,16 +45,9 @@
45#include "pci.h" 45#include "pci.h"
46#include "call_pci.h" 46#include "call_pci.h"
47 47
48/*
49 * Forward declares of prototypes.
50 */
51static struct device_node *find_Device_Node(int bus, int devfn);
52
53static int Pci_Retry_Max = 3; /* Only retry 3 times */ 48static int Pci_Retry_Max = 3; /* Only retry 3 times */
54static int Pci_Error_Flag = 1; /* Set Retry Error on. */ 49static int Pci_Error_Flag = 1; /* Set Retry Error on. */
55 50
56static struct pci_ops iSeries_pci_ops;
57
58/* 51/*
59 * Table defines 52 * Table defines
60 * Each Entry size is 4 MB * 1024 Entries = 4GB I/O address space. 53 * Each Entry size is 4 MB * 1024 Entries = 4GB I/O address space.
@@ -155,6 +148,22 @@ static void pci_Log_Error(char *Error_Text, int Bus, int SubBus,
155} 148}
156 149
157/* 150/*
151 * Look down the chain to find the matching Device Device
152 */
153static struct device_node *find_Device_Node(int bus, int devfn)
154{
155 struct device_node *node;
156
157 for (node = NULL; (node = of_find_all_nodes(node)); ) {
158 struct pci_dn *pdn = PCI_DN(node);
159
160 if (pdn && (bus == pdn->busno) && (devfn == pdn->devfn))
161 return node;
162 }
163 return NULL;
164}
165
166/*
158 * iSeries_pci_final_fixup(void) 167 * iSeries_pci_final_fixup(void)
159 */ 168 */
160void __init iSeries_pci_final_fixup(void) 169void __init iSeries_pci_final_fixup(void)
@@ -214,22 +223,6 @@ void __init iSeries_pci_final_fixup(void)
214 mf_display_src(0xC9000200); 223 mf_display_src(0xC9000200);
215} 224}
216 225
217/*
218 * Look down the chain to find the matching Device Device
219 */
220static struct device_node *find_Device_Node(int bus, int devfn)
221{
222 struct device_node *node;
223
224 for (node = NULL; (node = of_find_all_nodes(node)); ) {
225 struct pci_dn *pdn = PCI_DN(node);
226
227 if (pdn && (bus == pdn->busno) && (devfn == pdn->devfn))
228 return node;
229 }
230 return NULL;
231}
232
233#if 0 226#if 0
234/* 227/*
235 * Returns the device node for the passed pci_dev 228 * Returns the device node for the passed pci_dev