Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3846
b: refs/heads/master
c: 091ca9f
h: refs/heads/master
v: v3
  • Loading branch information
Rajesh Shah authored and Greg Kroah-Hartman committed Jun 28, 2005
1 parent b4760db commit 831809f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6ef6f0e33c4645fc8d23201ad5a6a289b4303cbb
refs/heads/master: 091ca9f06382e46d77213c35a97f7d0be9e350d2
14 changes: 9 additions & 5 deletions trunk/drivers/pci/remove.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,21 @@ static void pci_free_resources(struct pci_dev *dev)

static void pci_destroy_dev(struct pci_dev *dev)
{
pci_proc_detach_device(dev);
pci_remove_sysfs_dev_files(dev);
device_unregister(&dev->dev);
if (!list_empty(&dev->global_list)) {
pci_proc_detach_device(dev);
pci_remove_sysfs_dev_files(dev);
device_unregister(&dev->dev);
spin_lock(&pci_bus_lock);
list_del(&dev->global_list);
dev->global_list.next = dev->global_list.prev = NULL;
spin_unlock(&pci_bus_lock);
}

/* 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);
Expand Down

0 comments on commit 831809f

Please sign in to comment.