> drivers/built-in.o(.text+0x3106): In function `pci_remove_bus_device':
> : undefined reference to `pci_destroy_dev'
>
> pci_destroy_dev is defined under CONFIG_HOTPLUG and used outside.
>
> florin
>
> PS: I think changeset referenced in 10560659712069@kroah.com
> causes the problem.
An attempt at a fix. It just moves pci_desroy_dev outside the #ifdef).
I have no idea if this is the correct way to fix this. It compiles okay.
diff -Naurp hotplug.c.orig hotplug.c
--- hotplug.c.orig 2003-06-22 16:00:25.000000000 -0500
+++ hotplug.c 2003-06-22 16:01:20.000000000 -0500
@@ -219,6 +219,24 @@ int pci_hotplug (struct device *dev, cha
#endif /* 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);
+}
+
static void
pci_free_resources(struct pci_dev *dev)
{
-- Alex Goddard agoddard@purdue.edu - 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/