aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinas Vepstas <linas@linas.org>2005-11-03 19:54:29 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-09 23:29:33 -0500
commit9fb40eb883ad2d22ad6975b4323cb76e018fa280 (patch)
treec8f1f1a8e87b65cf69a01842eeb1efd52588d8e4 /arch
parentf751f84164bec4f38037b221a194c54d96c73d06 (diff)
[PATCH] powerpc: Remove duplicate code
234-eeh-find-pe.patch The find_device_pe() routine is duplicated in two files. Remove one of the two copies, declare the other extern. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> (cherry picked from 48408e708282d4d0269136ff27ea5acbd9410b5a commit)
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c2
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c13
2 files changed, 1 insertions, 14 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index be9814075254..d9662688c8b6 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -172,7 +172,7 @@ static inline unsigned long eeh_token_to_phys(unsigned long token)
172/** 172/**
173 * Return the "partitionable endpoint" (pe) under which this device lies 173 * Return the "partitionable endpoint" (pe) under which this device lies
174 */ 174 */
175static struct device_node * find_device_pe(struct device_node *dn) 175struct device_node * find_device_pe(struct device_node *dn)
176{ 176{
177 while ((dn->parent) && PCI_DN(dn->parent) && 177 while ((dn->parent) && PCI_DN(dn->parent) &&
178 (PCI_DN(dn->parent)->eeh_mode & EEH_MODE_SUPPORTED)) { 178 (PCI_DN(dn->parent)->eeh_mode & EEH_MODE_SUPPORTED)) {
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index f6cff065d89d..199a3ce54786 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -42,19 +42,6 @@ static inline const char * pcid_name (struct pci_dev *pdev)
42 return ""; 42 return "";
43} 43}
44 44
45/**
46 * Return the "partitionable endpoint" (pe) under which this device lies
47 */
48static struct device_node * find_device_pe(struct device_node *dn)
49{
50 while ((dn->parent) && PCI_DN(dn->parent) &&
51 (PCI_DN(dn->parent)->eeh_mode & EEH_MODE_SUPPORTED)) {
52 dn = dn->parent;
53 }
54 return dn;
55}
56
57
58#ifdef DEBUG 45#ifdef DEBUG
59static void print_device_node_tree (struct pci_dn *pdn, int dent) 46static void print_device_node_tree (struct pci_dn *pdn, int dent)
60{ 47{