diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2020-11-06 14:08:48 +0800 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-11-16 12:47:47 +0530 |
commit | 5a77b16c6b2b0eb5ab108d1933e99be769f5c90f (patch) | |
tree | 8c2cab8b30bbdfdbbef9f5340d0cd427b6d6b4fa /drivers/phy | |
parent | 2f0c9fac3be6c834427f9d2af2107ebd6602d4b1 (diff) |
phy: phy-stm32-usbphyc: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource to simplify code
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: Amelie Delaunay <amelie.delaunay@st.com>
Link: https://lore.kernel.org/r/1604642930-29019-15-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy')
-rw-r--r-- | drivers/phy/st/phy-stm32-usbphyc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/phy/st/phy-stm32-usbphyc.c b/drivers/phy/st/phy-stm32-usbphyc.c index 2b3639cba51a..0ab18f2078db 100644 --- a/drivers/phy/st/phy-stm32-usbphyc.c +++ b/drivers/phy/st/phy-stm32-usbphyc.c @@ -311,7 +311,6 @@ static int stm32_usbphyc_probe(struct platform_device *pdev) struct stm32_usbphyc *usbphyc; struct device *dev = &pdev->dev; struct device_node *child, *np = dev->of_node; - struct resource *res; struct phy_provider *phy_provider; u32 version; int ret, port = 0; @@ -322,8 +321,7 @@ static int stm32_usbphyc_probe(struct platform_device *pdev) usbphyc->dev = dev; dev_set_drvdata(dev, usbphyc); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - usbphyc->base = devm_ioremap_resource(dev, res); + usbphyc->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(usbphyc->base)) return PTR_ERR(usbphyc->base); |