From: Vignesh Raghavendra <vigneshr@ti.com>
To: qiwuchen55@gmail.com, tony@atomide.com, aaro.koskinen@iki.fi
Cc: linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org,
chenqiwu <chenqiwu@xiaomi.com>
Subject: Re: [PATCH] i2c: omap: use devm_platform_ioremap_resource()
Date: Tue, 18 Feb 2020 11:28:17 +0530 [thread overview]
Message-ID: <5f045d3c-d106-9f2d-1b2c-b7b6b04bfaba@ti.com> (raw)
In-Reply-To: <1581755803-11242-1-git-send-email-qiwuchen55@gmail.com>
On 15/02/20 2:06 pm, qiwuchen55@gmail.com wrote:
> From: chenqiwu <chenqiwu@xiaomi.com>
>
> Use a new API devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
> ---
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
> drivers/i2c/busses/i2c-omap.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 2dfea35..47d994a 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -1355,7 +1355,6 @@ static void omap_i2c_unprepare_recovery(struct i2c_adapter *adap)
> {
> struct omap_i2c_dev *omap;
> struct i2c_adapter *adap;
> - struct resource *mem;
> const struct omap_i2c_bus_platform_data *pdata =
> dev_get_platdata(&pdev->dev);
> struct device_node *node = pdev->dev.of_node;
> @@ -1375,8 +1374,7 @@ static void omap_i2c_unprepare_recovery(struct i2c_adapter *adap)
> if (!omap)
> return -ENOMEM;
>
> - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - omap->base = devm_ioremap_resource(&pdev->dev, mem);
> + omap->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(omap->base))
> return PTR_ERR(omap->base);
>
>
--
Regards
Vignesh
next prev parent reply other threads:[~2020-02-18 5:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-15 8:36 [PATCH] i2c: omap: use devm_platform_ioremap_resource() qiwuchen55
2020-02-17 8:13 ` Luca Ceresoli
2020-02-18 5:58 ` Vignesh Raghavendra [this message]
2020-03-10 9:51 ` 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=5f045d3c-d106-9f2d-1b2c-b7b6b04bfaba@ti.com \
--to=vigneshr@ti.com \
--cc=aaro.koskinen@iki.fi \
--cc=chenqiwu@xiaomi.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=qiwuchen55@gmail.com \
--cc=tony@atomide.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