]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/pci/host/pci-tegra.c
PCI: tegra: Use of_device_get_match_data()
[karo-tx-linux.git] / drivers / pci / host / pci-tegra.c
index 7756a792600c126c0d93cd3d2674c5f4b44b8d8c..2d520755b1d735e01f165b50f97e8eaff165ec09 100644 (file)
@@ -2201,21 +2201,16 @@ remove:
 
 static int tegra_pcie_probe(struct platform_device *pdev)
 {
-       const struct of_device_id *match;
        struct tegra_pcie *pcie;
        int err;
 
-       match = of_match_device(tegra_pcie_of_match, &pdev->dev);
-       if (!match)
-               return -ENODEV;
-
        pcie = devm_kzalloc(&pdev->dev, sizeof(*pcie), GFP_KERNEL);
        if (!pcie)
                return -ENOMEM;
 
+       pcie->soc = of_device_get_match_data(&pdev->dev);
        INIT_LIST_HEAD(&pcie->buses);
        INIT_LIST_HEAD(&pcie->ports);
-       pcie->soc = match->data;
        pcie->dev = &pdev->dev;
 
        err = tegra_pcie_parse_dt(pcie);