pci_destroy_dev symbol when CONFIG_HOTPLUG is not set in 2.5.73

Nikita Melnikov (slkw@stud2.aanet.ru)
Wed, 25 Jun 2003 14:29:07 +0400


If we don't have CONFIG_HOTPLUG make bzImage fails because it's
impossible to find pci_destroy_dev symbol. So this patch fixes
drivers/pci/hotplug.c.

----CUT----
--- hotplug.c 2003-06-25 14:12:21.000000000 +0400
+++ hotplug.c 2003-06-25 14:12:38.000000000 +0400
@@ -173,24 +173,6 @@
}
EXPORT_SYMBOL(pci_visit_dev);

-static void pci_destroy_dev(struct pci_dev *dev)
-{
- pci_proc_detach_device(dev);
- device_unregister(&dev->dev);
-
- /* Remove the device from the device lists, and prevent any further
- * list accesses from this device */
- spin_lock(&pci_bus_lock);
- list_del(&dev->bus_list);
- list_del(&dev->global_list);
- dev->bus_list.next = dev->bus_list.prev = NULL;
- dev->global_list.next = dev->global_list.prev = NULL;
- spin_unlock(&pci_bus_lock);
-
- pci_free_resources(dev);
- pci_dev_put(dev);
-}
-
/**
* pci_remove_device_safe - remove an unused hotplug device
* @dev: the device to remove
@@ -211,6 +193,25 @@

#else /* CONFIG_HOTPLUG */

+static void pci_destroy_dev(struct pci_dev *dev)
+{
+ pci_proc_detach_device(dev);
+ device_unregister(&dev->dev);
+
+ /* Remove the device from the device lists, and prevent any further
+ * list accesses from this device */
+ spin_lock(&pci_bus_lock);
+ list_del(&dev->bus_list);
+ list_del(&dev->global_list);
+ dev->bus_list.next = dev->bus_list.prev = NULL;
+ dev->global_list.next = dev->global_list.prev = NULL;
+ spin_unlock(&pci_bus_lock);
+
+ pci_free_resources(dev);
+ pci_dev_put(dev);
+}
+EXPORT_SYMBOL(pci_destroy_dev);
+
int pci_hotplug (struct device *dev, char **envp, int num_envp,
char *buffer, int buffer_size)
{
----CUT----

PS: please CC: me, I'm not subscribed.

-- 
Nikita Melnikov
Don't beat me; this's my first post to linux-kernel! :-)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/