linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
To: Laurent Navet <laurent.navet@gmail.com>
Cc: jic23@cam.ac.uk, My self <ch.naveen@samsung.com>,
	lars@metafoo.de, sachin.kamat@linaro.org, dianders@chromium.org,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: exynos_adc: use devm_ioremap_resource()
Date: Thu, 2 May 2013 14:30:30 -0700	[thread overview]
Message-ID: <CAHfPSqAn1tki7-NSKmJfqgEcvj1gQg0q99Q1Sed7cTvDuYNkWg@mail.gmail.com> (raw)
In-Reply-To: <1367529031-4915-1-git-send-email-laurent.navet@gmail.com>

On 2 May 2013 14:10, Laurent Navet <laurent.navet@gmail.com> wrote:
> Replace calls to deprecated devm_request_and_ioremap by devm_ioremap_resource.
>
> Found with coccicheck and this semantic patch:
>  scripts/coccinelle/api/devm_request_and_ioremap.cocci.
>
> Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Hello Laurent,


But, we already have patch from Sachin
http://patches.linaro.org/15833/
lined up for merge.

Thanks for the post.
Naveen
> ---
>  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;
>         }
>
> --
> 1.7.10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



--
Shine bright,
(: Nav :)

      reply	other threads:[~2013-05-02 21:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02 21:10 [PATCH] iio: adc: exynos_adc: use devm_ioremap_resource() Laurent Navet
2013-05-02 21:30 ` Naveen Krishna Ch [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=CAHfPSqAn1tki7-NSKmJfqgEcvj1gQg0q99Q1Sed7cTvDuYNkWg@mail.gmail.com \
    --to=naveenkrishna.ch@gmail.com \
    --cc=ch.naveen@samsung.com \
    --cc=dianders@chromium.org \
    --cc=jic23@cam.ac.uk \
    --cc=lars@metafoo.de \
    --cc=laurent.navet@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sachin.kamat@linaro.org \
    /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).