aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy/samsung/phy-exynos-pcie.c
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2020-11-06 14:08:47 +0800
committerVinod Koul <vkoul@kernel.org>2020-11-16 12:47:47 +0530
commit2f0c9fac3be6c834427f9d2af2107ebd6602d4b1 (patch)
tree4adb0a384ffa16b632be3cc3a207f153e24fce73 /drivers/phy/samsung/phy-exynos-pcie.c
parentphy: rockchip: convert to devm_platform_ioremap_resource (diff)
downloadlinux-dev-2f0c9fac3be6c834427f9d2af2107ebd6602d4b1.tar.xz
linux-dev-2f0c9fac3be6c834427f9d2af2107ebd6602d4b1.zip
phy: samsung: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/1604642930-29019-14-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/samsung/phy-exynos-pcie.c')
-rw-r--r--drivers/phy/samsung/phy-exynos-pcie.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/phy/samsung/phy-exynos-pcie.c b/drivers/phy/samsung/phy-exynos-pcie.c
index 7e28b1aea0d1..c98fff5c1ac8 100644
--- a/drivers/phy/samsung/phy-exynos-pcie.c
+++ b/drivers/phy/samsung/phy-exynos-pcie.c
@@ -232,7 +232,6 @@ static int exynos_pcie_phy_probe(struct platform_device *pdev)
struct exynos_pcie_phy *exynos_phy;
struct phy *generic_phy;
struct phy_provider *phy_provider;
- struct resource *res;
const struct exynos_pcie_phy_data *drv_data;
drv_data = of_device_get_match_data(dev);
@@ -243,13 +242,11 @@ static int exynos_pcie_phy_probe(struct platform_device *pdev)
if (!exynos_phy)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- exynos_phy->phy_base = devm_ioremap_resource(dev, res);
+ exynos_phy->phy_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(exynos_phy->phy_base))
return PTR_ERR(exynos_phy->phy_base);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- exynos_phy->blk_base = devm_ioremap_resource(dev, res);
+ exynos_phy->blk_base = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(exynos_phy->blk_base))
return PTR_ERR(exynos_phy->blk_base);