Messages in this thread Patch in this message | | | Date | Sun, 22 Jun 2003 16:58:19 -0500 (EST) | From | Alex Goddard <> | Subject | Re: Linux 2.5.73 |
| |
On Sun, 22 Jun 2003, Alex Goddard wrote:
> On Sun, 22 Jun 2003, Florin Iucha wrote: > > > 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.
Ack. Dumb-assed mistake in that one. This one shouldn't die during compile if CONFIG_HOTPLUG is turned on. The other one defined pci_destroy_dev() twice because I'm dumb.
It does compile (with and without hotplug) and boot.
-- Alex Goddard agoddard@purdue.edu--- hotplug.c.orig 2003-06-22 16:00:25.000000000 -0500 +++ hotplug.c 2003-06-22 16:54:33.000000000 -0500 @@ -11,6 +11,7 @@ #endif static void pci_free_resources(struct pci_dev *dev); +static void pci_destroy_dev(struct pci_dev *dev); #ifdef CONFIG_HOTPLUG int pci_hotplug (struct device *dev, char **envp, int num_envp, @@ -173,24 +174,6 @@ int pci_visit_dev (struct pci_visit *fn, } 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 @@ -219,6 +202,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) { | |