]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pci/hotplug/rpaphp_pci.c
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-2.6-omap-h63xx.git] / drivers / pci / hotplug / rpaphp_pci.c
index 1f5e73be47c74c877b9f2cb143e03d1fb7061dce..6f6cbede5135cde8cd7f9a8a2b68c6a77b7c8ea9 100644 (file)
@@ -32,7 +32,7 @@
 #include "../pci.h"            /* for pci_add_new_bus */
 #include "rpaphp.h"
 
-static int rpaphp_get_sensor_state(struct slot *slot, int *state)
+int rpaphp_get_sensor_state(struct slot *slot, int *state)
 {
        int rc;
        int setlevel;
@@ -116,18 +116,6 @@ static void print_slot_pci_funcs(struct pci_bus *bus)
        return;
 }
 
-int rpaphp_unconfig_pci_adapter(struct pci_bus *bus)
-{
-       struct pci_dev *dev, *tmp;
-
-       list_for_each_entry_safe(dev, tmp, &bus->devices, bus_list) {
-               eeh_remove_bus_device(dev);
-               pci_remove_bus_device(dev);
-       }
-       return 0;
-}
-EXPORT_SYMBOL_GPL(rpaphp_unconfig_pci_adapter);
-
 static int setup_pci_hotplug_slot_info(struct slot *slot)
 {
        struct hotplug_slot_info *hotplug_slot_info = slot->hotplug_slot->info;
@@ -211,7 +199,7 @@ exit_rc:
        return -EINVAL;
 }
 
-int register_pci_slot(struct slot *slot)
+int rpaphp_register_pci_slot(struct slot *slot)
 {
        int rc = -EINVAL;
 
@@ -219,36 +207,8 @@ int register_pci_slot(struct slot *slot)
                goto exit_rc;
        if (setup_pci_slot(slot))
                goto exit_rc;
-       rc = register_slot(slot);
+       rc = rpaphp_register_slot(slot);
 exit_rc:
        return rc;
 }
 
-int rpaphp_enable_pci_slot(struct slot *slot)
-{
-       int retval = 0, state;
-
-       retval = rpaphp_get_sensor_state(slot, &state);
-       if (retval)
-               goto exit;
-       dbg("%s: sensor state[%d]\n", __FUNCTION__, state);
-       /* if slot is not empty, enable the adapter */
-       if (state == PRESENT) {
-               dbg("%s : slot[%s] is occupied.\n", __FUNCTION__, slot->name);
-               pcibios_add_pci_devices(slot->bus);
-               slot->state = CONFIGURED;
-               info("%s: devices in slot[%s] configured\n",
-                                       __FUNCTION__, slot->name);
-       } else if (state == EMPTY) {
-               dbg("%s : slot[%s] is empty\n", __FUNCTION__, slot->name);
-               slot->state = EMPTY;
-       } else {
-               err("%s: slot[%s] is in invalid state\n", __FUNCTION__,
-                   slot->name);
-               slot->state = NOT_VALID;
-               retval = -EINVAL;
-       }
-exit:
-       dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval);
-       return retval;
-}