From: Baolin Wang <baolin.wang@linaro.org>
To: wsa+renesas@sang-engineering.com, orsonzhai@gmail.com,
zhang.lyra@gmail.com
Cc: baolin.wang@linaro.org, vincent.guittot@linaro.org,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] i2c: sprd: Change to use devm_platform_ioremap_resource()
Date: Thu, 25 Jul 2019 15:56:17 +0800 [thread overview]
Message-ID: <29fa51009a97e6b7d8622190810b7505819ac0b2.1564041157.git.baolin.wang@linaro.org> (raw)
In-Reply-To: <c9e2c50b54577e4b5cb7cc424f4c6de5f116cf60.1564041157.git.baolin.wang@linaro.org>
In-Reply-To: <c9e2c50b54577e4b5cb7cc424f4c6de5f116cf60.1564041157.git.baolin.wang@linaro.org>
Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
---
drivers/i2c/busses/i2c-sprd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-sprd.c b/drivers/i2c/busses/i2c-sprd.c
index 8002835..bbcb056 100644
--- a/drivers/i2c/busses/i2c-sprd.c
+++ b/drivers/i2c/busses/i2c-sprd.c
@@ -478,7 +478,6 @@ static int sprd_i2c_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct sprd_i2c *i2c_dev;
- struct resource *res;
u32 prop;
int ret;
@@ -488,8 +487,7 @@ static int sprd_i2c_probe(struct platform_device *pdev)
if (!i2c_dev)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- i2c_dev->base = devm_ioremap_resource(dev, res);
+ i2c_dev->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(i2c_dev->base))
return PTR_ERR(i2c_dev->base);
--
1.7.9.5
next prev parent reply other threads:[~2019-07-25 7:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 7:56 [PATCH 1/3] i2c: sprd: Make I2C driver can be built as a module Baolin Wang
2019-07-25 7:56 ` Baolin Wang [this message]
2019-08-06 20:41 ` [PATCH 2/3] i2c: sprd: Change to use devm_platform_ioremap_resource() Wolfram Sang
2019-07-25 7:56 ` [PATCH 3/3] i2c: sprd: Validate the return value of clock initialization Baolin Wang
2019-08-06 20:41 ` Wolfram Sang
2019-08-06 20:41 ` [PATCH 1/3] i2c: sprd: Make I2C driver can be built as a module 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=29fa51009a97e6b7d8622190810b7505819ac0b2.1564041157.git.baolin.wang@linaro.org \
--to=baolin.wang@linaro.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=orsonzhai@gmail.com \
--cc=vincent.guittot@linaro.org \
--cc=wsa+renesas@sang-engineering.com \
--cc=zhang.lyra@gmail.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 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).