[PATCH] PCI Hotplug: rpaphp: Remove unused stuff
authorJohn Rose <johnrose@austin.ibm.com>
Mon, 25 Jul 2005 15:16:37 +0000 (10:16 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 8 Sep 2005 21:57:22 +0000 (14:57 -0700)
Subject line says it all :)

Signed-off-by: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/hotplug/rpaphp.h
drivers/pci/hotplug/rpaphp_pci.c

index 81746e6..25bea00 100644 (file)
@@ -72,11 +72,6 @@ extern int debug;
 #define        CONFIGURED      1
 #define        EMPTY           0
 
 #define        CONFIGURED      1
 #define        EMPTY           0
 
-struct rpaphp_pci_func {
-       struct pci_dev *pci_dev;
-       struct list_head sibling;
-};
-
 /*
  * struct slot - slot information for each *physical* slot
  */
 /*
  * struct slot - slot information for each *physical* slot
  */
@@ -113,7 +108,6 @@ extern int rpaphp_enable_pci_slot(struct slot *slot);
 extern int register_pci_slot(struct slot *slot);
 extern int rpaphp_unconfig_pci_adapter(struct slot *slot);
 extern int rpaphp_get_pci_adapter_status(struct slot *slot, int is_init, u8 * value);
 extern int register_pci_slot(struct slot *slot);
 extern int rpaphp_unconfig_pci_adapter(struct slot *slot);
 extern int rpaphp_get_pci_adapter_status(struct slot *slot, int is_init, u8 * value);
-extern struct hotplug_slot *rpaphp_find_hotplug_slot(struct pci_dev *dev);
 
 /* rpaphp_core.c */
 extern int rpaphp_add_slot(struct device_node *dn);
 
 /* rpaphp_core.c */
 extern int rpaphp_add_slot(struct device_node *dn);
index d8305a9..ab67d3d 100644 (file)
@@ -186,39 +186,6 @@ rpaphp_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus)
        }
 }
 
        }
 }
 
-static int rpaphp_pci_config_bridge(struct pci_dev *dev);
-
-/*****************************************************************************
- rpaphp_pci_config_slot() will  configure all devices under the 
- given slot->dn and return the the first pci_dev.
- *****************************************************************************/
-static struct pci_dev *
-rpaphp_pci_config_slot(struct device_node *dn, struct pci_bus *bus)
-{
-       struct device_node *eads_first_child = dn->child;
-       struct pci_dev *dev = NULL;
-       int num;
-       
-       dbg("Enter %s: dn=%s bus=%s\n", __FUNCTION__, dn->full_name, bus->name);
-
-       if (eads_first_child) {
-               /* pci_scan_slot should find all children of EADs */
-               num = pci_scan_slot(bus, PCI_DEVFN(PCI_SLOT(eads_first_child->devfn), 0));
-               if (num) {
-                       rpaphp_fixup_new_pci_devices(bus, 1); 
-                       pci_bus_add_devices(bus);
-               }
-               dev = rpaphp_find_pci_dev(eads_first_child);
-               if (!dev) {
-                       err("No new device found\n");
-                       return NULL;
-               }
-               if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) 
-                       rpaphp_pci_config_bridge(dev);
-       }
-       return dev;
-}
-
 static int rpaphp_pci_config_bridge(struct pci_dev *dev)
 {
        u8 sec_busno;
 static int rpaphp_pci_config_bridge(struct pci_dev *dev)
 {
        u8 sec_busno;
@@ -252,6 +219,37 @@ static int rpaphp_pci_config_bridge(struct pci_dev *dev)
        return 0;
 }
 
        return 0;
 }
 
+/*****************************************************************************
+ rpaphp_pci_config_slot() will  configure all devices under the
+ given slot->dn and return the the first pci_dev.
+ *****************************************************************************/
+static struct pci_dev *
+rpaphp_pci_config_slot(struct device_node *dn, struct pci_bus *bus)
+{
+       struct device_node *eads_first_child = dn->child;
+       struct pci_dev *dev = NULL;
+       int num;
+
+       dbg("Enter %s: dn=%s bus=%s\n", __FUNCTION__, dn->full_name, bus->name);
+
+       if (eads_first_child) {
+               /* pci_scan_slot should find all children of EADs */
+               num = pci_scan_slot(bus, PCI_DEVFN(PCI_SLOT(eads_first_child->devfn), 0));
+               if (num) {
+                       rpaphp_fixup_new_pci_devices(bus, 1);
+                       pci_bus_add_devices(bus);
+               }
+               dev = rpaphp_find_pci_dev(eads_first_child);
+               if (!dev) {
+                       err("No new device found\n");
+                       return NULL;
+               }
+               if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE)
+                       rpaphp_pci_config_bridge(dev);
+       }
+       return dev;
+}
+
 static void enable_eeh(struct device_node *dn)
 {
        struct device_node *sib;
 static void enable_eeh(struct device_node *dn)
 {
        struct device_node *sib;
@@ -502,37 +500,3 @@ exit:
        dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval);
        return retval;
 }
        dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval);
        return retval;
 }
-
-struct hotplug_slot *rpaphp_find_hotplug_slot(struct pci_dev *dev)
-{
-       struct list_head        *tmp, *n;
-       struct slot             *slot;
-
-       list_for_each_safe(tmp, n, &rpaphp_slot_head) {
-               struct pci_bus *bus;
-               struct list_head *ln;
-
-               slot = list_entry(tmp, struct slot, rpaphp_slot_list);
-               if (slot->bridge == NULL) {
-                       if (slot->dev_type == PCI_DEV) {
-                               printk(KERN_WARNING "PCI slot missing bridge %s %s \n", 
-                                                   slot->name, slot->location);
-                       }
-                       continue;
-               }
-
-               bus = slot->bridge->subordinate;
-               if (!bus) {
-                       continue;  /* should never happen? */
-               }
-               for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) {
-                                struct pci_dev *pdev = pci_dev_b(ln);
-                               if (pdev == dev)
-                                       return slot->hotplug_slot;
-               }
-       }
-
-       return NULL;
-}
-
-EXPORT_SYMBOL_GPL(rpaphp_find_hotplug_slot);