|
@@ -23,6 +23,20 @@ static struct pci_host_bridge *find_pci_host_bridge(struct pci_bus *bus)
|
|
|
return to_pci_host_bridge(root_bus->bridge);
|
|
|
}
|
|
|
|
|
|
+struct device *pci_get_host_bridge_device(struct pci_dev *dev)
|
|
|
+{
|
|
|
+ struct pci_bus *root_bus = find_pci_root_bus(dev->bus);
|
|
|
+ struct device *bridge = root_bus->bridge;
|
|
|
+
|
|
|
+ kobject_get(&bridge->kobj);
|
|
|
+ return bridge;
|
|
|
+}
|
|
|
+
|
|
|
+void pci_put_host_bridge_device(struct device *dev)
|
|
|
+{
|
|
|
+ kobject_put(&dev->kobj);
|
|
|
+}
|
|
|
+
|
|
|
void pci_set_host_bridge_release(struct pci_host_bridge *bridge,
|
|
|
void (*release_fn)(struct pci_host_bridge *),
|
|
|
void *release_data)
|