diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2020-11-06 14:08:40 +0800 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-11-16 12:47:47 +0530 |
commit | ee55b501bd8ceb12c30ff0c0240498a301e126db (patch) | |
tree | 4566c7c7f902b3d3ebf990dc8ac52b7236423e07 /drivers/phy/marvell/phy-mvebu-sata.c | |
parent | 6c9111bc9eef0ff0302a0963ff802d31e21bfe05 (diff) |
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-mvebu-sata.c')
-rw-r--r-- | drivers/phy/marvell/phy-mvebu-sata.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/phy/marvell/phy-mvebu-sata.c b/drivers/phy/marvell/phy-mvebu-sata.c index 3c01b5dceaae..51a4646e2933 100644 --- a/drivers/phy/marvell/phy-mvebu-sata.c +++ b/drivers/phy/marvell/phy-mvebu-sata.c @@ -80,7 +80,6 @@ static const struct phy_ops phy_mvebu_sata_ops = { static int phy_mvebu_sata_probe(struct platform_device *pdev) { struct phy_provider *phy_provider; - struct resource *res; struct priv *priv; struct phy *phy; @@ -88,8 +87,7 @@ static int phy_mvebu_sata_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(&pdev->dev, res); + priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base)) return PTR_ERR(priv->base); |