git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
drivers
/
pci
/
remove.c
diff --git
a/drivers/pci/remove.c
b/drivers/pci/remove.c
index
99ffbd4
..
1a6bf9d
100644
(file)
--- a/
drivers/pci/remove.c
+++ b/
drivers/pci/remove.c
@@
-22,18
+22,18
@@
static void pci_destroy_dev(struct pci_dev *dev)
pci_proc_detach_device(dev);
pci_remove_sysfs_dev_files(dev);
device_unregister(&dev->dev);
pci_proc_detach_device(dev);
pci_remove_sysfs_dev_files(dev);
device_unregister(&dev->dev);
-
down_write(&pci_bus_sem
);
+
spin_lock(&pci_bus_lock
);
list_del(&dev->global_list);
dev->global_list.next = dev->global_list.prev = NULL;
list_del(&dev->global_list);
dev->global_list.next = dev->global_list.prev = NULL;
-
up_write(&pci_bus_sem
);
+
spin_unlock(&pci_bus_lock
);
}
/* Remove the device from the device lists, and prevent any further
* list accesses from this device */
}
/* Remove the device from the device lists, and prevent any further
* list accesses from this device */
-
down_write(&pci_bus_sem
);
+
spin_lock(&pci_bus_lock
);
list_del(&dev->bus_list);
dev->bus_list.next = dev->bus_list.prev = NULL;
list_del(&dev->bus_list);
dev->bus_list.next = dev->bus_list.prev = NULL;
-
up_write(&pci_bus_sem
);
+
spin_unlock(&pci_bus_lock
);
pci_free_resources(dev);
pci_dev_put(dev);
pci_free_resources(dev);
pci_dev_put(dev);
@@
-62,9
+62,9
@@
void pci_remove_bus(struct pci_bus *pci_bus)
{
pci_proc_detach_bus(pci_bus);
{
pci_proc_detach_bus(pci_bus);
-
down_write(&pci_bus_sem
);
+
spin_lock(&pci_bus_lock
);
list_del(&pci_bus->node);
list_del(&pci_bus->node);
-
up_write(&pci_bus_sem
);
+
spin_unlock(&pci_bus_lock
);
pci_remove_legacy_files(pci_bus);
class_device_remove_file(&pci_bus->class_dev,
&class_device_attr_cpuaffinity);
pci_remove_legacy_files(pci_bus);
class_device_remove_file(&pci_bus->class_dev,
&class_device_attr_cpuaffinity);