From: Jonathan Cameron <jic23@kernel.org>
To: Thierry Reding <thierry.reding@avionic-design.de>
Cc: linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
Wolfram Sang <w.sang@pengutronix.de>,
Jonathan Cameron <jic23@cam.ac.uk>,
linux-iio@vger.kernel.org
Subject: Re: [PATCH 11/33] iio: Convert to devm_ioremap_resource()
Date: Tue, 22 Jan 2013 12:12:22 +0000 [thread overview]
Message-ID: <50FE8226.5050209@kernel.org> (raw)
In-Reply-To: <1358762966-20791-12-git-send-email-thierry.reding@avionic-design.de>
On 01/21/2013 10:09 AM, Thierry Reding wrote:
> Convert all uses of devm_request_and_ioremap() to the newly introduced
> devm_ioremap_resource() which provides more consistent error handling.
>
> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
> Cc: Jonathan Cameron <jic23@cam.ac.uk>
> Cc: linux-iio@vger.kernel.org
Looks fine to me.
Acked-by: Jonathan Cameron <jic23@kernel.org>
> ---
> drivers/iio/adc/at91_adc.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
> index a526c0e..83c836b 100644
> --- a/drivers/iio/adc/at91_adc.c
> +++ b/drivers/iio/adc/at91_adc.c
> @@ -557,9 +557,9 @@ static int at91_adc_probe(struct platform_device *pdev)
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>
> - st->reg_base = devm_request_and_ioremap(&pdev->dev, res);
> - if (!st->reg_base) {
> - ret = -ENOMEM;
> + st->reg_base = devm_ioremap_resource(&pdev->dev, res);
> + if (IS_ERR(st->reg_base)) {
> + ret = PTR_ERR(st->reg_base);
> goto error_free_device;
> }
>
>
prev parent reply other threads:[~2013-01-22 12:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1358762966-20791-1-git-send-email-thierry.reding@avionic-design.de>
2013-01-21 10:09 ` [PATCH 11/33] iio: Convert to devm_ioremap_resource() Thierry Reding
2013-01-22 12:12 ` Jonathan Cameron [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=50FE8226.5050209@kernel.org \
--to=jic23@kernel.org \
--cc=arnd@arndb.de \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@cam.ac.uk \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thierry.reding@avionic-design.de \
--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 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).