From: Jonathan Cameron <jic23@kernel.org>
To: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Cc: linux-iio@vger.kernel.org, Jonathan Cameron <jic23@cam.ac.uk>,
Naveen Krishna Chatradhi <ch.naveen@samsung.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Sachin Kamat <sachin.kamat@linaro.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers: iio: adc: convert to devm_ioremap_resource()
Date: Wed, 22 May 2013 22:21:06 +0100 [thread overview]
Message-ID: <519D36C2.5000009@kernel.org> (raw)
In-Reply-To: <1368270391-15267-1-git-send-email-silviupopescu1990@gmail.com>
On 05/11/2013 12:06 PM, Silviu-Mihai Popescu 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: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Patch number 3 doing the same thing. I was somewhat tardy applying
the first one so sorry for wasting your time on this.
Jonathan
> ---
> drivers/iio/adc/exynos_adc.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
> index 9f3a8ef..22d034a 100644
> --- a/drivers/iio/adc/exynos_adc.c
> +++ b/drivers/iio/adc/exynos_adc.c
> @@ -270,16 +270,16 @@ static int exynos_adc_probe(struct platform_device *pdev)
> info = iio_priv(indio_dev);
>
> mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - info->regs = devm_request_and_ioremap(&pdev->dev, mem);
> - if (!info->regs) {
> - ret = -ENOMEM;
> + info->regs = devm_ioremap_resource(&pdev->dev, mem);
> + if (IS_ERR(info->regs)) {
> + ret = PTR_ERR(info->regs);
> goto err_iio;
> }
>
> mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> - info->enable_reg = devm_request_and_ioremap(&pdev->dev, mem);
> - if (!info->enable_reg) {
> - ret = -ENOMEM;
> + info->enable_reg = devm_ioremap_resource(&pdev->dev, mem);
> + if (IS_ERR(info->enable_reg)) {
> + ret = PTR_ERR(info->enable_reg);
> goto err_iio;
> }
>
>
prev parent reply other threads:[~2013-05-22 21:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-11 11:06 [PATCH] drivers: iio: adc: convert to devm_ioremap_resource() Silviu-Mihai Popescu
2013-05-22 21:21 ` 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=519D36C2.5000009@kernel.org \
--to=jic23@kernel.org \
--cc=ch.naveen@samsung.com \
--cc=jic23@cam.ac.uk \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sachin.kamat@linaro.org \
--cc=silviupopescu1990@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 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.