Skip to content

Commit ae22157

Browse files
Marc Zyngierjannau
authored andcommitted
PCI: ecam: Allow cfg->priv to be pre-populated from the root port device
In order to decouple ecam config space creation from probing via pci_host_common_probe(), allow the private pointer to be populated via the device drvdata pointer. Crucially, this is set before calling ops->init(), allowing that particular callback to have access to probe data. This should have no impact on existing code which ignores the current value of cfg->priv. Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 87203dd commit ae22157

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/pci/ecam.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ struct pci_config_window *pci_ecam_create(struct device *dev,
8484
goto err_exit_iomap;
8585
}
8686

87+
cfg->priv = dev_get_drvdata(dev);
88+
8789
if (ops->init) {
8890
err = ops->init(cfg);
8991
if (err)

0 commit comments

Comments
 (0)