From: Jean Delvare <khali@linux-fr.org>
To: Vitaly Wool <vitalywool@gmail.com>
Cc: Julia Lawall <julia@diku.dk>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] drivers/i2c: Correct use of request_region/request_mem_region
Date: Sat, 12 Sep 2009 18:04:25 +0200 [thread overview]
Message-ID: <20090912180425.6dbf339d@hyperion.delvare> (raw)
In-Reply-To: <Pine.LNX.4.64.0908091506160.16252@ask.diku.dk>
On Sun, 9 Aug 2009 15:06:43 +0200 (CEST), Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
>
> request_mem_region should be used when ioremap is used subsequently.
> release_region is then correspondingly replaced by release_mem_region.
> (...)
> Signed-off-by: Julia Lawall <julia@diku.dk>
>
> ---
> drivers/i2c/busses/i2c-pnx.c | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
> index ec15cff..6ff6c20 100644
> --- a/drivers/i2c/busses/i2c-pnx.c
> +++ b/drivers/i2c/busses/i2c-pnx.c
> @@ -586,7 +586,8 @@ static int __devinit i2c_pnx_probe(struct platform_device *pdev)
> alg_data->mif.timer.data = (unsigned long)i2c_pnx->adapter;
>
> /* Register I/O resource */
> - if (!request_region(alg_data->base, I2C_PNX_REGION_SIZE, pdev->name)) {
> + if (!request_mem_region(alg_data->base, I2C_PNX_REGION_SIZE,
> + pdev->name)) {
> dev_err(&pdev->dev,
> "I/O region 0x%08x for I2C already in use.\n",
> alg_data->base);
> @@ -650,7 +651,7 @@ out_clock:
> out_unmap:
> iounmap((void *)alg_data->ioaddr);
> out_release:
> - release_region(alg_data->base, I2C_PNX_REGION_SIZE);
> + release_mem_region(alg_data->base, I2C_PNX_REGION_SIZE);
> out_drvdata:
> platform_set_drvdata(pdev, NULL);
> out:
> @@ -667,7 +668,7 @@ static int __devexit i2c_pnx_remove(struct platform_device *pdev)
> i2c_del_adapter(adap);
> i2c_pnx->set_clock_stop(pdev);
> iounmap((void *)alg_data->ioaddr);
> - release_region(alg_data->base, I2C_PNX_REGION_SIZE);
> + release_mem_region(alg_data->base, I2C_PNX_REGION_SIZE);
> platform_set_drvdata(pdev, NULL);
>
> return 0;
Vitaly, can you please ack this change?
--
Jean Delvare
prev parent reply other threads:[~2009-09-12 16:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-09 13:06 [PATCH] drivers/i2c: Correct use of request_region/request_mem_region Julia Lawall
2009-09-12 16:04 ` Jean Delvare [this message]
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=20090912180425.6dbf339d@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vitalywool@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).