OSDN Git Service

msm: pcie: move PCIe enumerate sysfs init
authorTony Truong <truong@codeaurora.org>
Thu, 20 Apr 2017 18:04:03 +0000 (11:04 -0700)
committerGerrit - the friendly Code Review server <code-review@localhost>
Thu, 4 May 2017 17:17:39 +0000 (10:17 -0700)
PCIe enumerate sysfs initialization should be
done after all other resources are setup.

Change-Id: I33b43e39453eeee9ac9e22bd1a5463af9eb1fd05
Signed-off-by: Tony Truong <truong@codeaurora.org>
drivers/pci/host/pci-msm.c

index 243afbe..8bb759d 100644 (file)
@@ -6449,7 +6449,6 @@ static int msm_pcie_probe(struct platform_device *pdev)
        }
 
        dev_set_drvdata(&msm_pcie_dev[rc_idx].pdev->dev, &msm_pcie_dev[rc_idx]);
-       msm_pcie_sysfs_init(&msm_pcie_dev[rc_idx]);
 
        ret = msm_pcie_get_resources(&msm_pcie_dev[rc_idx],
                                msm_pcie_dev[rc_idx].pdev);
@@ -6500,6 +6499,8 @@ static int msm_pcie_probe(struct platform_device *pdev)
                goto decrease_rc_num;
        }
 
+       msm_pcie_sysfs_init(&msm_pcie_dev[rc_idx]);
+
        msm_pcie_dev[rc_idx].drv_ready = true;
 
        if (msm_pcie_dev[rc_idx].boot_option &