All of lore.kernel.org
 help / color / mirror / Atom feed
From: Swapnil Jakhade <sjakhade@cadence.com>
To: <vkoul@kernel.org>, <kishon@ti.com>, <robh+dt@kernel.org>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>
Cc: <mparab@cadence.com>, <sjakhade@cadence.com>,
	<yamonkar@cadence.com>, <tomi.valkeinen@ti.com>, <jsarha@ti.com>,
	<nsekhar@ti.com>
Subject: [PATCH v1 2/7] phy: cadence-torrent: Use devm_platform_ioremap_resource() to get reg addresses
Date: Fri, 7 Aug 2020 12:12:40 +0200	[thread overview]
Message-ID: <1596795165-13341-3-git-send-email-sjakhade@cadence.com> (raw)
In-Reply-To: <1596795165-13341-1-git-send-email-sjakhade@cadence.com>

Use devm_platform_ioremap_resource() to get register addresses instead of
boilerplate code.

Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
---
 drivers/phy/cadence/phy-cadence-torrent.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c
index 50c30d49300e..177120afcc35 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;
@@ -1740,8 +1739,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);
 
@@ -1831,9 +1829,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;
-- 
2.26.1


  parent reply	other threads:[~2020-08-07 10:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07 10:12 [PATCH v1 0/7] PHY: Prepare Cadence Torrent PHY driver to support multilink configurations Swapnil Jakhade
2020-08-07 10:12 ` [PATCH v1 1/7] phy: cadence-torrent: Use of_device_get_match_data() to get driver data Swapnil Jakhade
2020-08-07 10:12 ` Swapnil Jakhade [this message]
2020-08-07 10:12 ` [PATCH v1 3/7] phy: cadence-torrent: Enable support for multiple subnodes Swapnil Jakhade
2020-08-07 10:12 ` [PATCH v1 4/7] phy: cadence-torrent: Add separate regmap functions for torrent and DP Swapnil Jakhade
2020-08-07 10:12 ` [PATCH v1 5/7] phy: cadence-torrent: Check total lane count for all subnodes is within limit Swapnil Jakhade
2020-08-07 10:12 ` [PATCH v1 6/7] dt-bindings: phy: cadence-torrent: Add binding to specify SSC mode Swapnil Jakhade
2020-08-17 22:13   ` Rob Herring
2020-08-07 10:12 ` [PATCH v1 7/7] dt-bindings: phy: cadence-torrent: Update Torrent PHY bindings for generic use Swapnil Jakhade
2020-08-12 10:11   ` Kishon Vijay Abraham I
2020-08-17 10:11     ` Swapnil Kashinath Jakhade
2020-08-12 16:26   ` Rob Herring
2020-08-18  7:08     ` Swapnil Kashinath Jakhade

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1596795165-13341-3-git-send-email-sjakhade@cadence.com \
    --to=sjakhade@cadence.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jsarha@ti.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mparab@cadence.com \
    --cc=nsekhar@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=tomi.valkeinen@ti.com \
    --cc=vkoul@kernel.org \
    --cc=yamonkar@cadence.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.