diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2020-11-06 07:08:37 +0100 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-11-16 08:17:46 +0100 |
commit | fa62909400fa5abc53cc76cb4917bb92b8bf3a2d (patch) | |
tree | 91dbdf24e4edd3ada4f978a5715f60cd03100d88 /drivers/phy/cadence/phy-cadence-sierra.c | |
parent | phy: broadcom: convert to devm_platform_ioremap_resource(_byname) (diff) | |
download | linux-fa62909400fa5abc53cc76cb4917bb92b8bf3a2d.tar.xz linux-fa62909400fa5abc53cc76cb4917bb92b8bf3a2d.zip |
phy: cadence: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource to simplify code
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
Link: https://lore.kernel.org/r/1604642930-29019-4-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/cadence/phy-cadence-sierra.c')
-rw-r--r-- | drivers/phy/cadence/phy-cadence-sierra.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c index 453ef26fa1c7..26a0badabe38 100644 --- a/drivers/phy/cadence/phy-cadence-sierra.c +++ b/drivers/phy/cadence/phy-cadence-sierra.c @@ -479,7 +479,6 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev) const struct of_device_id *match; struct cdns_sierra_data *data; unsigned int id_value; - struct resource *res; int i, ret, node = 0; void __iomem *base; struct clk *clk; @@ -502,8 +501,7 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev) sp->dev = dev; sp->init_data = data; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) { dev_err(dev, "missing \"reg\"\n"); return PTR_ERR(base); |