From: Chunfeng Yun Date: Fri, 6 Nov 2020 06:08:42 +0000 (+0800) Subject: phy: phy-mtk-ufs: convert to devm_platform_ioremap_resource X-Git-Tag: accepted/tizen/unified/20230118.172025~8316^2~40^2~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7458d650e256b2b418efa4c974585846da4358a6;p=platform%2Fkernel%2Flinux-rpi.git phy: phy-mtk-ufs: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1604642930-29019-9-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul --- diff --git a/drivers/phy/mediatek/phy-mtk-ufs.c b/drivers/phy/mediatek/phy-mtk-ufs.c index cf94f5c..769b00b0 100644 --- a/drivers/phy/mediatek/phy-mtk-ufs.c +++ b/drivers/phy/mediatek/phy-mtk-ufs.c @@ -195,7 +195,6 @@ static int ufs_mtk_phy_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct phy *generic_phy; struct phy_provider *phy_provider; - struct resource *res; struct ufs_mtk_phy *phy; int ret; @@ -203,8 +202,7 @@ static int ufs_mtk_phy_probe(struct platform_device *pdev) if (!phy) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - phy->mmio = devm_ioremap_resource(dev, res); + phy->mmio = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(phy->mmio)) return PTR_ERR(phy->mmio);