]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
PCI: rpaphp: remove print_slot_pci_funcs()
authorLinas Vepstas <linas@austin.ibm.com>
Fri, 13 Apr 2007 22:34:17 +0000 (15:34 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 3 May 2007 02:02:39 +0000 (19:02 -0700)
The debug function print_slot_pci_funcs() is a large wrapper
around two debug print statements.  Just invoke these directly.

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_pci.c

index 6417b7074ed49ac66c947838ab60c4faa1d2f148..6271be8b155e31834696c4d668dde53a52dd8daf 100644 (file)
@@ -64,21 +64,6 @@ int rpaphp_get_sensor_state(struct slot *slot, int *state)
        return rc;
 }
 
-static void print_slot_pci_funcs(struct pci_bus *bus)
-{
-       struct device_node *dn;
-       struct pci_dev *dev;
-
-       dn = pci_bus_to_OF_node(bus);
-       if (!dn)
-               return;
-
-       dbg("%s: pci_devs of slot[%s]\n", __FUNCTION__, dn->full_name);
-       list_for_each_entry (dev, &bus->devices, bus_list)
-               dbg("\t%s\n", pci_name(dev));
-       return;
-}
-
 static void set_slot_name(struct slot *slot)
 {
        struct pci_bus *bus = slot->bus;
@@ -138,11 +123,17 @@ int rpaphp_register_pci_slot(struct slot *slot)
                if (list_empty(&bus->devices))
                        pcibios_add_pci_devices(bus);
 
-               print_slot_pci_funcs(bus);
                if (!list_empty(&bus->devices)) {
                        info->adapter_status = CONFIGURED;
                        slot->state = CONFIGURED;
                }
+
+               if (debug) {
+                       struct pci_dev *dev;
+                       dbg("%s: pci_devs of slot[%s]\n", __FUNCTION__, slot->dn->full_name);
+                       list_for_each_entry (dev, &bus->devices, bus_list)
+                               dbg("\t%s\n", pci_name(dev));
+               }
        }
 
        return rpaphp_register_slot(slot);