From: Laurent Navet <laurent.navet@gmail.com>
To: jic23@cam.ac.uk
Cc: ch.naveen@samsung.com, lars@metafoo.de, sachin.kamat@linaro.org,
dianders@chromium.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org,
Laurent Navet <laurent.navet@gmail.com>
Subject: [PATCH] iio: adc: exynos_adc: use devm_ioremap_resource()
Date: Thu, 2 May 2013 23:10:31 +0200 [thread overview]
Message-ID: <1367529031-4915-1-git-send-email-laurent.navet@gmail.com> (raw)
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>
---
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
next reply other threads:[~2013-05-02 21:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-02 21:10 Laurent Navet [this message]
2013-05-02 21:30 ` Naveen Krishna Ch
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=1367529031-4915-1-git-send-email-laurent.navet@gmail.com \
--to=laurent.navet@gmail.com \
--cc=ch.naveen@samsung.com \
--cc=dianders@chromium.org \
--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 \
/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
all inboxes | Powered by JetHome®