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-sun50i-usb3.c | |
parent | 6edf7700a9dde8d3e494d1b390b5284329642a70 (diff) | |
download | linux-08d4deda6970a91313955934487a37077b1792cb.tar.bz2 |
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-sun50i-usb3.c')
-rw-r--r-- | drivers/phy/allwinner/phy-sun50i-usb3.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/phy/allwinner/phy-sun50i-usb3.c b/drivers/phy/allwinner/phy-sun50i-usb3.c index b1c04f71a31d..84055b720016 100644 --- a/drivers/phy/allwinner/phy-sun50i-usb3.c +++ b/drivers/phy/allwinner/phy-sun50i-usb3.c @@ -134,7 +134,6 @@ static int sun50i_usb3_phy_probe(struct platform_device *pdev) struct sun50i_usb3_phy *phy; struct device *dev = &pdev->dev; struct phy_provider *phy_provider; - struct resource *res; phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); if (!phy) @@ -153,8 +152,7 @@ static int sun50i_usb3_phy_probe(struct platform_device *pdev) return PTR_ERR(phy->reset); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - phy->regs = devm_ioremap_resource(dev, res); + phy->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(phy->regs)) return PTR_ERR(phy->regs); |