diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2020-11-06 09:08:34 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-11-16 10:17:46 +0300 |
commit | 08d4deda6970a91313955934487a37077b1792cb (patch) | |
tree | 94cfb46ada8c7ee0e46d7b22952571d47c58f84c /drivers/phy/allwinner/phy-sun9i-usb.c | |
parent | 6edf7700a9dde8d3e494d1b390b5284329642a70 (diff) | |
download | linux-08d4deda6970a91313955934487a37077b1792cb.tar.xz |
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-sun9i-usb.c')
-rw-r--r-- | drivers/phy/allwinner/phy-sun9i-usb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/phy/allwinner/phy-sun9i-usb.c b/drivers/phy/allwinner/phy-sun9i-usb.c index fc6784dd7fa0..2f9e60c188b8 100644 --- a/drivers/phy/allwinner/phy-sun9i-usb.c +++ b/drivers/phy/allwinner/phy-sun9i-usb.c @@ -117,7 +117,6 @@ static int sun9i_usb_phy_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct phy_provider *phy_provider; - struct resource *res; phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); if (!phy) @@ -156,8 +155,7 @@ static int sun9i_usb_phy_probe(struct platform_device *pdev) } } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - phy->pmu = devm_ioremap_resource(dev, res); + phy->pmu = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(phy->pmu)) return PTR_ERR(phy->pmu); |