summaryrefslogtreecommitdiff
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2016-11-25 11:57:10 +0100
committerBjorn Helgaas <helgaas@kernel.org>2016-12-07 12:05:48 -0600
commit5909406598d9fab58be860b72dff9409bff11653 (patch)
treeac32f861756ae7f87003e25b70f64932ba6665fc /drivers/pci/probe.c
parent37d6a0a6f4700ad3ae7bbf8db38b4557e97b3fe4 (diff)
downloadlinux-rt-5909406598d9fab58be860b72dff9409bff11653.tar.gz
PCI: Allow driver-specific data in host bridge
Provide a way to allocate driver-specific data along with a PCI host bridge structure. The bridge's ->private field points to this data. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Bjorn Helgaas <helgaas@kernel.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 4853c8fbd701..cf9cb6f30782 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -521,11 +521,11 @@ static void pci_release_host_bridge_dev(struct device *dev)
kfree(bridge);
}
-static struct pci_host_bridge *pci_alloc_host_bridge(void)
+static struct pci_host_bridge *pci_alloc_host_bridge(size_t priv)
{
struct pci_host_bridge *bridge;
- bridge = kzalloc(sizeof(*bridge), GFP_KERNEL);
+ bridge = kzalloc(sizeof(*bridge) + priv, GFP_KERNEL);
if (!bridge)
return NULL;
@@ -2253,7 +2253,7 @@ static struct pci_bus *pci_create_root_bus_msi(struct device *parent,
int error;
struct pci_host_bridge *bridge;
- bridge = pci_alloc_host_bridge();
+ bridge = pci_alloc_host_bridge(0);
if (!bridge)
return NULL;