2013-05-16 08:13:10

by Laurent Navet

[permalink] [raw]
Subject: [PATCH V2] drivers: mmc: host: use devm_ioremap_resource()

This second version fix a typo in commit message reported by Jingoo Han

Regards,
Laurent.


2013-05-16 08:13:18

by Laurent Navet

[permalink] [raw]
Subject: [PATCH V2] drivers: mmc: host: use devm_ioremap_resource()

Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.

Found with coccicheck and this semantic patch:
scripts/coccinelle/api/devm_ioremap_resource.cocci

Signed-off-by: Laurent Navet <[email protected]>
---
drivers/mmc/host/mvsdio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
index 8960fc8..a66ee4b 100644
--- a/drivers/mmc/host/mvsdio.c
+++ b/drivers/mmc/host/mvsdio.c
@@ -758,9 +758,9 @@ static int __init mvsd_probe(struct platform_device *pdev)

spin_lock_init(&host->lock);

- host->base = devm_request_and_ioremap(&pdev->dev, r);
- if (!host->base) {
- ret = -ENOMEM;
+ host->base = devm_ioremap_resource(&pdev->dev, r);
+ if (IS_ERR(host->base)) {
+ ret = PTR_ERR(host->base);
goto out;
}

--
1.7.10.4

2013-05-16 08:20:37

by Jingoo Han

[permalink] [raw]
Subject: Re: [PATCH V2] drivers: mmc: host: use devm_ioremap_resource()

Thursday, May 16, 2013 5:22 PM, Laurent Navet wrote:
>
> Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.
>
> Found with coccicheck and this semantic patch:
> scripts/coccinelle/api/devm_ioremap_resource.cocci
>
> Signed-off-by: Laurent Navet <[email protected]>

Reviewed-by: Jingoo Han <[email protected]

Best regards,
Jingoo Han

> ---
> drivers/mmc/host/mvsdio.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
> index 8960fc8..a66ee4b 100644
> --- a/drivers/mmc/host/mvsdio.c
> +++ b/drivers/mmc/host/mvsdio.c
> @@ -758,9 +758,9 @@ static int __init mvsd_probe(struct platform_device *pdev)
>
> spin_lock_init(&host->lock);
>
> - host->base = devm_request_and_ioremap(&pdev->dev, r);
> - if (!host->base) {
> - ret = -ENOMEM;
> + host->base = devm_ioremap_resource(&pdev->dev, r);
> + if (IS_ERR(host->base)) {
> + ret = PTR_ERR(host->base);
> goto out;
> }
>
> --
> 1.7.10.4
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?