From: Jaehoon Chung Date: Fri, 16 Dec 2016 01:20:35 +0000 (+0900) Subject: pci: exynos5433: use the platform_get_resource_byname intead of index X-Git-Tag: submit/tizen/20170316.045621~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e5231c842b0733d63c9ae7d4e22b8de8aa63d02;p=platform%2Fkernel%2Flinux-exynos.git pci: exynos5433: use the platform_get_resource_byname intead of index Use the platform_get_resource_byname for getting correct resource. Change-Id: I1e4627705c2b612f457545ea1e07383b35d9450f Signed-off-by: Jaehoon Chung --- diff --git a/drivers/pci/host/pci-exynos5433.c b/drivers/pci/host/pci-exynos5433.c index ba3915593a75..196ae318c485 100644 --- a/drivers/pci/host/pci-exynos5433.c +++ b/drivers/pci/host/pci-exynos5433.c @@ -467,8 +467,8 @@ static int __init exynos_pcie_probe(struct platform_device *pdev) if (ret) goto fail_clk; - /* Application Register */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + /* External Local Bus interface(ELBI) Register */ + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "elbi"); exynos_pcie->elbi_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(exynos_pcie->elbi_base)) { ret = PTR_ERR(exynos_pcie->elbi_base); @@ -476,16 +476,16 @@ static int __init exynos_pcie_probe(struct platform_device *pdev) } /* Physical Layer Register */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phy"); exynos_pcie->phy_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(exynos_pcie->phy_base)) { ret = PTR_ERR(exynos_pcie->phy_base); goto fail_bus_clk; } - /* Workaround Block register(System register) */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 2); - exynos_pcie->block_base = devm_ioremap_resource(&pdev->dev, res); + /* Data Bus Interface(DBI) Register */ + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi"); + pp->dbi_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(exynos_pcie->block_base)) goto fail_bus_clk;