From 9bcf0a6fdc5062e451cd6f1ab39045e142a5938f Mon Sep 17 00:00:00 2001 From: Kishon Vijay Abraham I Date: Wed, 15 Feb 2017 18:48:11 +0530 Subject: PCI: dwc: all: Use platform_set_drvdata() to save private data Add platform_set_drvdata() in all designware-based drivers to store the private data structure of the driver so that dev_set_drvdata() can be used to get back private data structure in add_pcie_port/host_init. This is in preparation for splitting struct pcie_port into core and host only structures. After the split pcie_port will not be part of the driver's private data structure and *container_of* used now to get the private data pointer cannot be used. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas CC: Jingoo Han CC: Richard Zhu CC: Lucas Stach CC: Murali Karicheri CC: Minghuan Lian CC: Mingkai Hu CC: Roy Zang CC: Thomas Petazzoni CC: Niklas Cassel CC: Jesper Nilsson CC: Joao Pinto CC: Zhou Wang CC: Gabriele Paoloni CC: Stanimir Varbanov CC: Pratyush Anand --- drivers/pci/dwc/pcie-qcom.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/pci/dwc/pcie-qcom.c') diff --git a/drivers/pci/dwc/pcie-qcom.c b/drivers/pci/dwc/pcie-qcom.c index 1ecff2e07771..3f525cb985ee 100644 --- a/drivers/pci/dwc/pcie-qcom.c +++ b/drivers/pci/dwc/pcie-qcom.c @@ -716,6 +716,8 @@ static int qcom_pcie_probe(struct platform_device *pdev) if (ret) return ret; + platform_set_drvdata(pdev, pcie); + ret = dw_pcie_host_init(pp); if (ret) { dev_err(dev, "cannot initialize host\n"); -- cgit v1.2.3