diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2020-11-06 14:08:42 +0800 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-11-16 12:47:47 +0530 |
commit | 7458d650e256b2b418efa4c974585846da4358a6 (patch) | |
tree | 2be970d0bd7d413e0f5ea883daf1595087d09105 /drivers/phy/mediatek | |
parent | 5d797059ff57b2213153523f4cf031a811e53dbf (diff) |
phy: phy-mtk-ufs: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource to simplify code
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1604642930-29019-9-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/mediatek')
-rw-r--r-- | drivers/phy/mediatek/phy-mtk-ufs.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/phy/mediatek/phy-mtk-ufs.c b/drivers/phy/mediatek/phy-mtk-ufs.c index cf94f5c35dc5..769b00b038d8 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); |