summaryrefslogtreecommitdiffstats
path: root/drivers/phy/marvell/phy-mmp3-usb.c
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2020-11-06 14:08:40 +0800
committerVinod Koul <vkoul@kernel.org>2020-11-16 12:47:47 +0530
commitee55b501bd8ceb12c30ff0c0240498a301e126db (patch)
tree4566c7c7f902b3d3ebf990dc8ac52b7236423e07 /drivers/phy/marvell/phy-mmp3-usb.c
parent6c9111bc9eef0ff0302a0963ff802d31e21bfe05 (diff)
downloadlinux-ee55b501bd8ceb12c30ff0c0240498a301e126db.tar.bz2
phy: marvell: 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: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/1604642930-29019-7-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/marvell/phy-mmp3-usb.c')
-rw-r--r--drivers/phy/marvell/phy-mmp3-usb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/phy/marvell/phy-mmp3-usb.c b/drivers/phy/marvell/phy-mmp3-usb.c
index 499869595a58..04c0bada3519 100644
--- a/drivers/phy/marvell/phy-mmp3-usb.c
+++ b/drivers/phy/marvell/phy-mmp3-usb.c
@@ -246,7 +246,6 @@ MODULE_DEVICE_TABLE(of, mmp3_usb_phy_of_match);
static int mmp3_usb_phy_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct resource *resource;
struct mmp3_usb_phy *mmp3_usb_phy;
struct phy_provider *provider;
@@ -254,8 +253,7 @@ static int mmp3_usb_phy_probe(struct platform_device *pdev)
if (!mmp3_usb_phy)
return -ENOMEM;
- resource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- mmp3_usb_phy->base = devm_ioremap_resource(dev, resource);
+ mmp3_usb_phy->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(mmp3_usb_phy->base)) {
dev_err(dev, "failed to remap PHY regs\n");
return PTR_ERR(mmp3_usb_phy->base);