]> git.hungrycats.org Git - linux/commitdiff
[SPARC64]: Use pci_remove_bus_device to delete, found by Ben Collins.
authorDavid S. Miller <davem@nuts.ninka.net>
Fri, 7 Mar 2003 11:08:39 +0000 (03:08 -0800)
committerDavid S. Miller <davem@nuts.ninka.net>
Fri, 7 Mar 2003 11:08:39 +0000 (03:08 -0800)
arch/sparc64/kernel/pci_common.c

index 025639222b65f1e2d2ee2b720be80d12602354af..496c75fd447997fb2a4fce5204ea66c67306704c 100644 (file)
@@ -78,20 +78,6 @@ static int __init find_device_prom_node(struct pci_pbm_info *pbm,
        return 0;
 }
 
-/* Remove a PCI device from the device trees, then
- * free it up.  Note that this must run before
- * the device's resources are registered because we
- * do not handle unregistering them here.
- */
-static void pci_device_delete(struct pci_dev *pdev)
-{
-       list_del(&pdev->global_list);
-       list_del(&pdev->bus_list);
-
-       /* Ok, all references are gone, free it up. */
-       kfree(pdev);
-}
-
 /* Older versions of OBP on PCI systems encode 64-bit MEM
  * space assignments incorrectly, this fixes them up.  We also
  * take the opportunity here to hide other kinds of bogus
@@ -164,7 +150,7 @@ static void __init pdev_cookie_fillin(struct pci_pbm_info *pbm,
                 * second EBUS/HappyMeal pair if the external
                 * connector for it is not present.
                 */
-               pci_device_delete(pdev);
+               pci_remove_bus_device(pdev);
                return;
        }