projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branches 'acpi-cleanup' and 'acpi-video'
[linux-2.6-block.git]
/
drivers
/
pci
/
remove.c
diff --git
a/drivers/pci/remove.c
b/drivers/pci/remove.c
index 4ff36bfa785e56f9561d1e45d5813e438f64a95e..8bd76c9ba21cf4e5c5a4b58cb40ccd990cfacc5e 100644
(file)
--- a/
drivers/pci/remove.c
+++ b/
drivers/pci/remove.c
@@
-3,6
+3,18
@@
#include <linux/pci-aspm.h>
#include "pci.h"
#include <linux/pci-aspm.h>
#include "pci.h"
+static void pci_free_resources(struct pci_dev *dev)
+{
+ int i;
+
+ pci_cleanup_rom(dev);
+ for (i = 0; i < PCI_NUM_RESOURCES; i++) {
+ struct resource *res = dev->resource + i;
+ if (res->parent)
+ release_resource(res);
+ }
+}
+
static void pci_stop_dev(struct pci_dev *dev)
{
pci_pme_active(dev, false);
static void pci_stop_dev(struct pci_dev *dev)
{
pci_pme_active(dev, false);
@@
-25,6
+37,11
@@
static void pci_destroy_dev(struct pci_dev *dev)
device_del(&dev->dev);
device_del(&dev->dev);
+ down_write(&pci_bus_sem);
+ list_del(&dev->bus_list);
+ up_write(&pci_bus_sem);
+
+ pci_free_resources(dev);
put_device(&dev->dev);
}
put_device(&dev->dev);
}