PCI: Add parent device field to ECAM struct pci_config_window
Add a parent device field to struct pci_config_window. The parent is not saved now, but will be useful to save it in some cases. For ACPI on ARM64, it can be used to setup ACPI companion and domain. Since the parent dev is in struct pci_config_window now, we need not pass it to the init function as a separate argument. Signed-off-by: Jayachandran C <jchandra@broadcom.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
This commit is contained in:

committed by
Bjorn Helgaas

parent
80955f9ee5
commit
5c3d14f76f
@@ -51,6 +51,7 @@ struct pci_config_window *pci_ecam_create(struct device *dev,
|
||||
if (!cfg)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
cfg->parent = dev;
|
||||
cfg->ops = ops;
|
||||
cfg->busr.start = busr->start;
|
||||
cfg->busr.end = busr->end;
|
||||
@@ -94,7 +95,7 @@ struct pci_config_window *pci_ecam_create(struct device *dev,
|
||||
}
|
||||
|
||||
if (ops->init) {
|
||||
err = ops->init(dev, cfg);
|
||||
err = ops->init(cfg);
|
||||
if (err)
|
||||
goto err_exit;
|
||||
}
|
||||
|
Reference in New Issue
Block a user