From: Tushar Behera <tushar.behera@linaro.org>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-samsung-soc@vger.kernel.org, w.sang@pengutronix.de,
kgene.kim@samsung.com, patches@linaro.org
Subject: Re: [PATCH 4/7] i2c: s3c2410: Convert to use devm_ioremap()
Date: Fri, 23 Nov 2012 12:13:38 +0530 [thread overview]
Message-ID: <50AF1B1A.4080009@linaro.org> (raw)
In-Reply-To: <CAK9yfHyAWtuRFuygK2L53GrAaZ3k7rasTRt+N6TtU2+N-UHVTw@mail.gmail.com>
On 11/23/2012 11:44 AM, Sachin Kamat wrote:
> Hi Tushar,
>
> On 23 November 2012 11:29, Tushar Behera <tushar.behera@linaro.org> wrote:
>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
>> ---
>> drivers/i2c/busses/i2c-s3c2410.c | 13 ++++---------
>> 1 files changed, 4 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
>> index a274ef7..3446af2 100644
>> --- a/drivers/i2c/busses/i2c-s3c2410.c
>> +++ b/drivers/i2c/busses/i2c-s3c2410.c
>> @@ -996,7 +996,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
>> goto err_clk;
>> }
>>
>> - i2c->regs = ioremap(res->start, resource_size(res));
>> + i2c->regs = devm_ioremap(&pdev->dev, res->start, resource_size(res));
>>
>
> request_mem_region and ioremap and be replaced using a single
> devm_request_and_ioremap() call.
>
Thanks. I will redo the patch.
> Also you may squash patches 2-5 into single convert to devm_* functions patch.
>
Ok. In that case, I will squash these patches to a single patch.
>
>> if (i2c->regs == NULL) {
>> dev_err(&pdev->dev, "cannot map IO\n");
>> @@ -1016,7 +1016,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
>>
>> ret = s3c24xx_i2c_init(i2c);
>> if (ret != 0)
>> - goto err_iomap;
>> + goto err_clk;
>>
>> /* find the IRQ for this unit (note, this relies on the init call to
>> * ensure no current IRQs pending
>> @@ -1025,7 +1025,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
>> i2c->irq = ret = platform_get_irq(pdev, 0);
>> if (ret <= 0) {
>> dev_err(&pdev->dev, "cannot find IRQ\n");
>> - goto err_iomap;
>> + goto err_clk;
>> }
>>
>> ret = request_irq(i2c->irq, s3c24xx_i2c_irq, 0,
>> @@ -1033,7 +1033,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
>>
>> if (ret != 0) {
>> dev_err(&pdev->dev, "cannot claim IRQ %d\n", i2c->irq);
>> - goto err_iomap;
>> + goto err_clk;
>> }
>>
>> ret = s3c24xx_i2c_register_cpufreq(i2c);
>> @@ -1073,9 +1073,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
>> err_irq:
>> free_irq(i2c->irq, i2c);
>>
>> - err_iomap:
>> - iounmap(i2c->regs);
>> -
>> err_clk:
>> clk_disable_unprepare(i2c->clk);
>> return ret;
>> @@ -1100,8 +1097,6 @@ static int s3c24xx_i2c_remove(struct platform_device *pdev)
>>
>> clk_disable_unprepare(i2c->clk);
>>
>> - iounmap(i2c->regs);
>> -
>> s3c24xx_i2c_dt_gpio_free(i2c);
>>
>> return 0;
>> --
>> 1.7.4.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
>
>
>
--
Tushar Behera
next prev parent reply other threads:[~2012-11-23 6:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-23 5:59 [PATCH 0/7] i2c: s3c2410: Add devm_* apis and cleanup Tushar Behera
2012-11-23 5:59 ` [PATCH 1/7] i2c: s3c2410: Remove unnecessary label err_noclk Tushar Behera
2012-11-23 5:59 ` [PATCH 2/7] i2c: s3c2410: Convert to use devm_clk_get() Tushar Behera
[not found] ` <1353650353-17576-1-git-send-email-tushar.behera-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-11-23 5:59 ` [PATCH 3/7] i2c: s3c2410: Convert to use devm_request_mem_region() Tushar Behera
2012-11-23 5:59 ` Tushar Behera
2012-11-23 5:59 ` [PATCH 7/7] i2c: s3c2410: Remove err_cpufreq label Tushar Behera
2012-11-23 5:59 ` Tushar Behera
2012-11-23 6:15 ` [PATCH 0/7] i2c: s3c2410: Add devm_* apis and cleanup Shubhrajyoti Datta
2012-11-23 6:15 ` Shubhrajyoti Datta
[not found] ` <CAM=Q2cs=oYq4e17LXxUEhATiYLAjnzoTH-+nsO5KNQwGj2qSBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-23 6:44 ` Tushar Behera
2012-11-23 6:44 ` Tushar Behera
2012-11-23 5:59 ` [PATCH 4/7] i2c: s3c2410: Convert to use devm_ioremap() Tushar Behera
[not found] ` <1353650353-17576-5-git-send-email-tushar.behera-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-11-23 6:14 ` Sachin Kamat
2012-11-23 6:14 ` Sachin Kamat
2012-11-23 6:43 ` Tushar Behera [this message]
2012-11-23 5:59 ` [PATCH 5/7] i2c: s3c2410: Convert to use devm_request_irq() Tushar Behera
2012-11-23 5:59 ` [PATCH 6/7] i2c: s3c2410: Move location of clk_prepare_enable() call in probe function Tushar Behera
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=50AF1B1A.4080009@linaro.org \
--to=tushar.behera@linaro.org \
--cc=kgene.kim@samsung.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=patches@linaro.org \
--cc=sachin.kamat@linaro.org \
--cc=w.sang@pengutronix.de \
/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.