aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/host/pcie-rcar.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index 0d9b96c3c49d..cb07c45c1858 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -1125,7 +1125,6 @@ static int rcar_pcie_probe(struct platform_device *pdev)
1125 struct device *dev = &pdev->dev; 1125 struct device *dev = &pdev->dev;
1126 struct rcar_pcie *pcie; 1126 struct rcar_pcie *pcie;
1127 unsigned int data; 1127 unsigned int data;
1128 const struct of_device_id *of_id;
1129 int err; 1128 int err;
1130 int (*hw_init_fn)(struct rcar_pcie *); 1129 int (*hw_init_fn)(struct rcar_pcie *);
1131 1130
@@ -1149,11 +1148,6 @@ static int rcar_pcie_probe(struct platform_device *pdev)
1149 if (err) 1148 if (err)
1150 return err; 1149 return err;
1151 1150
1152 of_id = of_match_device(rcar_pcie_of_match, dev);
1153 if (!of_id || !of_id->data)
1154 return -EINVAL;
1155 hw_init_fn = of_id->data;
1156
1157 pm_runtime_enable(dev); 1151 pm_runtime_enable(dev);
1158 err = pm_runtime_get_sync(dev); 1152 err = pm_runtime_get_sync(dev);
1159 if (err < 0) { 1153 if (err < 0) {
@@ -1162,6 +1156,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
1162 } 1156 }
1163 1157
1164 /* Failure to get a link might just be that no cards are inserted */ 1158 /* Failure to get a link might just be that no cards are inserted */
1159 hw_init_fn = of_device_get_match_data(dev);
1165 err = hw_init_fn(pcie); 1160 err = hw_init_fn(pcie);
1166 if (err) { 1161 if (err) {
1167 dev_info(dev, "PCIe link down\n"); 1162 dev_info(dev, "PCIe link down\n");