summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2003-02-06 15:19:49 +1100
committerGreg Kroah-Hartman <greg@kroah.com>2003-02-06 15:19:49 +1100
commita3a4fa0f7a917be780d5b19a466123125b2e1544 (patch)
treea03e4be24edac9327d9c5666c673c7f66880abe3 /include/linux
parent74669ea65ed8612835c12591bd0f89700bcb82f2 (diff)
[PATCH] PCI Hotplug: moved the some stuff into the pci core
Moved functions from drivers/hotplug/pci_hotplug_util.c to drivers/pci/hotplug.c, which is a better place for them.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pci.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 7b693e39425f..7b42110379ac 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -671,6 +671,37 @@ void pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t addr);
extern struct pci_dev *isa_bridge;
#endif
+/* Some worker functions that PCI Hotplug drivers find useful */
+struct pci_dev_wrapped {
+ struct pci_dev *dev;
+ void *data;
+};
+
+struct pci_bus_wrapped {
+ struct pci_bus *bus;
+ void *data;
+};
+
+struct pci_visit {
+ int (* pre_visit_pci_bus) (struct pci_bus_wrapped *,
+ struct pci_dev_wrapped *);
+ int (* post_visit_pci_bus) (struct pci_bus_wrapped *,
+ struct pci_dev_wrapped *);
+
+ int (* pre_visit_pci_dev) (struct pci_dev_wrapped *,
+ struct pci_bus_wrapped *);
+ int (* visit_pci_dev) (struct pci_dev_wrapped *,
+ struct pci_bus_wrapped *);
+ int (* post_visit_pci_dev) (struct pci_dev_wrapped *,
+ struct pci_bus_wrapped *);
+};
+
+extern int pci_visit_dev(struct pci_visit *fn,
+ struct pci_dev_wrapped *wrapped_dev,
+ struct pci_bus_wrapped *wrapped_parent);
+extern int pci_is_dev_in_use(struct pci_dev *dev);
+extern int pci_remove_device_safe(struct pci_dev *dev);
+
#endif /* CONFIG_PCI */
/* Include architecture-dependent settings and functions */