Merge tag 'pci-v3.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
[linux-3.10.git] / drivers / pci / remove.c
index 84954a7..cc875e6 100644 (file)
@@ -24,7 +24,7 @@ static void pci_stop_dev(struct pci_dev *dev)
        if (dev->is_added) {
                pci_proc_detach_device(dev);
                pci_remove_sysfs_dev_files(dev);
-               device_unregister(&dev->dev);
+               device_del(&dev->dev);
                dev->is_added = 0;
        }
 
@@ -39,7 +39,7 @@ static void pci_destroy_dev(struct pci_dev *dev)
        up_write(&pci_bus_sem);
 
        pci_free_resources(dev);
-       pci_dev_put(dev);
+       put_device(&dev->dev);
 }
 
 void pci_remove_bus(struct pci_bus *bus)