* [PATCH] iio: adc: exynos_adc: use devm_ioremap_resource()
@ 2013-05-02 21:10 Laurent Navet
2013-05-02 21:30 ` Naveen Krishna Ch
0 siblings, 1 reply; 2+ messages in thread
From: Laurent Navet @ 2013-05-02 21:10 UTC (permalink / raw)
To: jic23
Cc: ch.naveen, lars, sachin.kamat, dianders, linux-iio, linux-kernel,
Laurent Navet
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: adc: exynos_adc: use devm_ioremap_resource()
2013-05-02 21:10 [PATCH] iio: adc: exynos_adc: use devm_ioremap_resource() Laurent Navet
@ 2013-05-02 21:30 ` Naveen Krishna Ch
0 siblings, 0 replies; 2+ messages in thread
From: Naveen Krishna Ch @ 2013-05-02 21:30 UTC (permalink / raw)
To: Laurent Navet
Cc: jic23, My self, lars, sachin.kamat, dianders, linux-iio, linux-kernel
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 :)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-02 21:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).