]> err.no Git - linux-2.6/commitdiff
PCI: rpaphp: refactor tail call to rpaphp_register_slot()
authorLinas Vepstas <linas@austin.ibm.com>
Fri, 13 Apr 2007 22:34:19 +0000 (15:34 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 3 May 2007 02:02:40 +0000 (19:02 -0700)
Eliminate the tail call to rpaphp_register_slot()
by placing it in the caller. This will help later
dis-entanglement.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/hotplug/rpaphp_core.c
drivers/pci/hotplug/rpaphp_pci.c

index e9c157d30e824bd739eb9d61eac5fdbd742e9f6c..d8e5f9fd357dbee6b9fbac49a03edb273ab07254 100644 (file)
@@ -319,6 +319,9 @@ int rpaphp_add_slot(struct device_node *dn)
                                indexes[i + 1], name, type);
 
                retval = rpaphp_register_pci_slot(slot);
+               if (!retval)
+                       retval = rpaphp_register_slot(slot);
+
                if (retval)
                        dealloc_slot_struct(slot);
 
index 6271be8b155e31834696c4d668dde53a52dd8daf..2e297b9ffa758e5deac96626ffc738a23c4b4f45 100644 (file)
@@ -136,6 +136,6 @@ int rpaphp_register_pci_slot(struct slot *slot)
                }
        }
 
-       return rpaphp_register_slot(slot);
+       return 0;
 }