All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cai Huoqing <caihuoqing@baidu.com>
To: <caihuoqing@baidu.com>
Cc: Santosh Shilimkar <ssantosh@kernel.org>,
	Nishanth Menon <nm@ti.com>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-pm@vger.kernel.org>
Subject: [PATCH 2/3] soc: ti: smartreflex: Make use of the helper function devm_platform_ioremap_resource()
Date: Wed, 8 Sep 2021 15:13:08 +0800	[thread overview]
Message-ID: <20210908071310.432-2-caihuoqing@baidu.com> (raw)
In-Reply-To: <20210908071310.432-1-caihuoqing@baidu.com>

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/soc/ti/smartreflex.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/ti/smartreflex.c b/drivers/soc/ti/smartreflex.c
index b5b2fa538d5c..fabbc9f16a3e 100644
--- a/drivers/soc/ti/smartreflex.c
+++ b/drivers/soc/ti/smartreflex.c
@@ -819,7 +819,7 @@ static int omap_sr_probe(struct platform_device *pdev)
 {
 	struct omap_sr *sr_info;
 	struct omap_sr_data *pdata = pdev->dev.platform_data;
-	struct resource *mem, *irq;
+	struct resource *irq;
 	struct dentry *nvalue_dir;
 	int i, ret = 0;
 
@@ -839,8 +839,7 @@ static int omap_sr_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	sr_info->base = devm_ioremap_resource(&pdev->dev, mem);
+	sr_info->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(sr_info->base))
 		return PTR_ERR(sr_info->base);
 
-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Cai Huoqing <caihuoqing@baidu.com>
To: <caihuoqing@baidu.com>
Cc: Santosh Shilimkar <ssantosh@kernel.org>,
	Nishanth Menon <nm@ti.com>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-pm@vger.kernel.org>
Subject: [PATCH 2/3] soc: ti: smartreflex: Make use of the helper function devm_platform_ioremap_resource()
Date: Wed, 8 Sep 2021 15:13:08 +0800	[thread overview]
Message-ID: <20210908071310.432-2-caihuoqing@baidu.com> (raw)
In-Reply-To: <20210908071310.432-1-caihuoqing@baidu.com>

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/soc/ti/smartreflex.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/ti/smartreflex.c b/drivers/soc/ti/smartreflex.c
index b5b2fa538d5c..fabbc9f16a3e 100644
--- a/drivers/soc/ti/smartreflex.c
+++ b/drivers/soc/ti/smartreflex.c
@@ -819,7 +819,7 @@ static int omap_sr_probe(struct platform_device *pdev)
 {
 	struct omap_sr *sr_info;
 	struct omap_sr_data *pdata = pdev->dev.platform_data;
-	struct resource *mem, *irq;
+	struct resource *irq;
 	struct dentry *nvalue_dir;
 	int i, ret = 0;
 
@@ -839,8 +839,7 @@ static int omap_sr_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	sr_info->base = devm_ioremap_resource(&pdev->dev, mem);
+	sr_info->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(sr_info->base))
 		return PTR_ERR(sr_info->base);
 
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-09-08  7:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08  7:13 [PATCH 1/3] soc: ti: k3-ringacc: Make use of the helper function devm_platform_ioremap_resource_byname() Cai Huoqing
2021-09-08  7:13 ` Cai Huoqing
2021-09-08  7:13 ` Cai Huoqing [this message]
2021-09-08  7:13   ` [PATCH 2/3] soc: ti: smartreflex: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-08  7:13 ` [PATCH 3/3] soc: ti: wkup_m3_ipc: " Cai Huoqing
2021-09-08  7:13   ` Cai Huoqing
2021-09-08  9:51 ` [PATCH 1/3] soc: ti: k3-ringacc: Make use of the helper function devm_platform_ioremap_resource_byname() Grygorii Strashko
2021-09-08  9:51   ` Grygorii Strashko

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=20210908071310.432-2-caihuoqing@baidu.com \
    --to=caihuoqing@baidu.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=ssantosh@kernel.org \
    /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.