From: Md Sadre Alam <quic_mdalam@quicinc.com>
To: loic.poulain@linaro.org, rfoss@kernel.org,
linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: quic_sjaganat@quicinc.com, quic_srichara@quicinc.com,
quic_varada@quicinc.com, quic_mdalam@quicinc.com
Subject: [PATCH 3/5] i2c: qcom-cci:Use devm_platform_get_and_ioremap_resource()
Date: Mon, 6 Mar 2023 20:15:22 +0530 [thread overview]
Message-ID: <20230306144522.15699-1-quic_mdalam@quicinc.com> (raw)
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
---
drivers/i2c/busses/i2c-qcom-cci.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c
index 01358472680c..ed70bc1e4926 100644
--- a/drivers/i2c/busses/i2c-qcom-cci.c
+++ b/drivers/i2c/busses/i2c-qcom-cci.c
@@ -581,8 +581,7 @@ static int cci_probe(struct platform_device *pdev)
/* Memory */
- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- cci->base = devm_ioremap_resource(dev, r);
+ cci->base = devm_platform_get_and_ioremap_resource(pdev, 0, &r);
if (IS_ERR(cci->base))
return PTR_ERR(cci->base);
--
2.17.1
next reply other threads:[~2023-03-06 14:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 14:45 Md Sadre Alam [this message]
2023-06-07 10:34 ` [PATCH 3/5] i2c: qcom-cci:Use devm_platform_get_and_ioremap_resource() Wolfram Sang
2023-06-07 12:25 ` Robert Foss
2023-06-08 19:26 ` Wolfram Sang
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=20230306144522.15699-1-quic_mdalam@quicinc.com \
--to=quic_mdalam@quicinc.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.poulain@linaro.org \
--cc=quic_sjaganat@quicinc.com \
--cc=quic_srichara@quicinc.com \
--cc=quic_varada@quicinc.com \
--cc=rfoss@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).