diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2020-11-06 14:08:34 +0800 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-11-16 12:47:46 +0530 |
commit | 08d4deda6970a91313955934487a37077b1792cb (patch) | |
tree | 94cfb46ada8c7ee0e46d7b22952571d47c58f84c /drivers/phy/allwinner/phy-sun6i-mipi-dphy.c | |
parent | 6edf7700a9dde8d3e494d1b390b5284329642a70 (diff) |
phy: allwinner: convert to devm_platform_ioremap_resource(_byname)
Use devm_platform_ioremap_resource(_byname) to simplify code
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1604642930-29019-1-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/allwinner/phy-sun6i-mipi-dphy.c')
-rw-r--r-- | drivers/phy/allwinner/phy-sun6i-mipi-dphy.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c b/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c index 1fa761ba6cbb..f0bc87d654d4 100644 --- a/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c +++ b/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c @@ -253,15 +253,13 @@ static int sun6i_dphy_probe(struct platform_device *pdev) { struct phy_provider *phy_provider; struct sun6i_dphy *dphy; - struct resource *res; void __iomem *regs; dphy = devm_kzalloc(&pdev->dev, sizeof(*dphy), GFP_KERNEL); if (!dphy) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(&pdev->dev, res); + regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(regs)) { dev_err(&pdev->dev, "Couldn't map the DPHY encoder registers\n"); return PTR_ERR(regs); |