aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/proc.c')
-rw-r--r--drivers/pci/proc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 449e890267a2..01f0306525a5 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -431,8 +431,6 @@ int pci_proc_detach_device(struct pci_dev *dev)
431 struct proc_dir_entry *e; 431 struct proc_dir_entry *e;
432 432
433 if ((e = dev->procent)) { 433 if ((e = dev->procent)) {
434 if (atomic_read(&e->count) > 1)
435 return -EBUSY;
436 remove_proc_entry(e->name, dev->bus->procdir); 434 remove_proc_entry(e->name, dev->bus->procdir);
437 dev->procent = NULL; 435 dev->procent = NULL;
438 } 436 }
@@ -485,9 +483,9 @@ static int __init pci_proc_init(void)
485 proc_create("devices", 0, proc_bus_pci_dir, 483 proc_create("devices", 0, proc_bus_pci_dir,
486 &proc_bus_pci_dev_operations); 484 &proc_bus_pci_dev_operations);
487 proc_initialized = 1; 485 proc_initialized = 1;
488 while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { 486 for_each_pci_dev(dev)
489 pci_proc_attach_device(dev); 487 pci_proc_attach_device(dev);
490 } 488
491 return 0; 489 return 0;
492} 490}
493 491