]> err.no Git - linux-2.6/commitdiff
[PATCH] powerpc: Remove duplicate code
authorLinas Vepstas <linas@linas.org>
Fri, 4 Nov 2005 00:54:29 +0000 (18:54 -0600)
committerPaul Mackerras <paulus@samba.org>
Tue, 10 Jan 2006 04:29:33 +0000 (15:29 +1100)
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)

arch/powerpc/platforms/pseries/eeh.c
arch/powerpc/platforms/pseries/eeh_driver.c
include/asm-powerpc/ppc-pci.h

index be98140752541d9c47d11fcd7dc0a1e05936c0be..d9662688c8b656faf8affda5aa9f281b71e46351 100644 (file)
@@ -172,7 +172,7 @@ static inline unsigned long eeh_token_to_phys(unsigned long token)
 /** 
  * Return the "partitionable endpoint" (pe) under which this device lies
  */
-static struct device_node * find_device_pe(struct device_node *dn)
+struct device_node * find_device_pe(struct device_node *dn)
 {
        while ((dn->parent) && PCI_DN(dn->parent) &&
              (PCI_DN(dn->parent)->eeh_mode & EEH_MODE_SUPPORTED)) {
index f6cff065d89dde0e934bf9ddb1f795e88f7a2efa..199a3ce547866e7ec6bc0bcdb722a96807c7a661 100644 (file)
@@ -42,19 +42,6 @@ static inline const char * pcid_name (struct pci_dev *pdev)
        return "";
 }
 
-/**
- * Return the "partitionable endpoint" (pe) under which this device lies
- */
-static struct device_node * find_device_pe(struct device_node *dn)
-{
-       while ((dn->parent) && PCI_DN(dn->parent) &&
-             (PCI_DN(dn->parent)->eeh_mode & EEH_MODE_SUPPORTED)) {
-               dn = dn->parent;
-       }
-       return dn;
-}
-
-
 #ifdef DEBUG
 static void print_device_node_tree (struct pci_dn *pdn, int dent)
 {
index 79239a200f188babe55f6e64ac2c46785b572a71..4820b368bf157894cf93f5d2e979648c4754c0ca 100644 (file)
@@ -109,6 +109,9 @@ int rtas_write_config(struct pci_dn *, int where, int size, u32 val);
 void eeh_mark_slot (struct device_node *dn, int mode_flag);
 void eeh_clear_slot (struct device_node *dn, int mode_flag);
 
+/* Find the associated "Partiationable Endpoint" PE */
+struct device_node * find_device_pe(struct device_node *dn);
+
 #endif
 
 #endif /* __KERNEL__ */