diff options
author | Swapnil Jakhade <sjakhade@cadence.com> | 2020-09-16 20:28:26 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-09-18 10:34:46 +0530 |
commit | 46d205af3015b325dffa1b11495071c637bce0f6 (patch) | |
tree | 86caba3accbb0e6f208765fb2a6ab5e723e12638 /drivers/phy | |
parent | 29d1fd2f2cc6a112abf93bca23a6852b6f1f112d (diff) |
phy: cadence-torrent: Use devm_platform_ioremap_resource() to get reg addresses
Use devm_platform_ioremap_resource() to get register addresses instead of
boilerplate code.
Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
Link: https://lore.kernel.org/r/1600280911-9214-3-git-send-email-sjakhade@cadence.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy')
-rw-r--r-- | drivers/phy/cadence/phy-cadence-torrent.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c index 0211083a4d09..bd8656dfc919 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -1705,7 +1705,6 @@ static int cdns_regmap_init_torrent_dp(struct cdns_torrent_phy *cdns_phy, static int cdns_torrent_phy_probe(struct platform_device *pdev) { - struct resource *regs; struct cdns_torrent_phy *cdns_phy; struct device *dev = &pdev->dev; struct phy_provider *phy_provider; @@ -1739,8 +1738,7 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) return PTR_ERR(cdns_phy->clk); } - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - cdns_phy->sd_base = devm_ioremap_resource(&pdev->dev, regs); + cdns_phy->sd_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(cdns_phy->sd_base)) return PTR_ERR(cdns_phy->sd_base); @@ -1830,9 +1828,7 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) } /* DPTX registers */ - regs = platform_get_resource(pdev, IORESOURCE_MEM, 1); - cdns_phy->base = devm_ioremap_resource(&pdev->dev, - regs); + cdns_phy->base = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(cdns_phy->base)) { ret = PTR_ERR(cdns_phy->base); goto put_child; |