diff options
Diffstat (limited to 'drivers/pci/remove.c')
-rw-r--r-- | drivers/pci/remove.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c index 1576851028db..cc9337a71529 100644 --- a/drivers/pci/remove.c +++ b/drivers/pci/remove.c | |||
@@ -24,7 +24,7 @@ static void pci_stop_dev(struct pci_dev *dev) | |||
24 | if (dev->is_added) { | 24 | if (dev->is_added) { |
25 | pci_proc_detach_device(dev); | 25 | pci_proc_detach_device(dev); |
26 | pci_remove_sysfs_dev_files(dev); | 26 | pci_remove_sysfs_dev_files(dev); |
27 | device_del(&dev->dev); | 27 | device_release_driver(&dev->dev); |
28 | dev->is_added = 0; | 28 | dev->is_added = 0; |
29 | } | 29 | } |
30 | 30 | ||
@@ -34,6 +34,8 @@ static void pci_stop_dev(struct pci_dev *dev) | |||
34 | 34 | ||
35 | static void pci_destroy_dev(struct pci_dev *dev) | 35 | static void pci_destroy_dev(struct pci_dev *dev) |
36 | { | 36 | { |
37 | device_del(&dev->dev); | ||
38 | |||
37 | down_write(&pci_bus_sem); | 39 | down_write(&pci_bus_sem); |
38 | list_del(&dev->bus_list); | 40 | list_del(&dev->bus_list); |
39 | up_write(&pci_bus_sem); | 41 | up_write(&pci_bus_sem); |