Skip to content

Commit 4900454

Browse files
Marc ZyngierMani-Sadhasivam
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 <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]> Tested-by: Janne Grunau <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent afc0a57 commit 4900454

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)