aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/remove.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-12-30 08:45:00 -0500
committerMark Brown <broonie@linaro.org>2013-12-30 08:45:00 -0500
commit68e67d97e1f91ed11e041b67f3a1336f518c608f (patch)
tree1de288bc05f1cf1bfec20200a60ffe99dcce77ae /drivers/pci/remove.c
parent9e03d05eee4ca45ed12749ef6c26bf616262cdd2 (diff)
parent802eee95bde72fd0cd0f3a5b2098375a487d1eda (diff)
Merge tag 'v3.13-rc6' into spi-rcar
To resolve spurious merge conflicts with fixes. Linux 3.13-rc6
Diffstat (limited to 'drivers/pci/remove.c')
-rw-r--r--drivers/pci/remove.c4
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
35static void pci_destroy_dev(struct pci_dev *dev) 35static 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);