mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers: mmc: host: use devm_ioremap_resource()
@ 2013-05-12 14:44 Laurent Navet
  2013-05-14  0:39 ` Jingoo Han
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Navet @ 2013-05-12 14:44 UTC (permalink / raw)
  To: nico, cjb
  Cc: andrew, thomas.petazzoni, jason, jg1.han, linux-mmc,
	linux-kernel, Laurent Navet

eplace 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 <laurent.navet@gmail.com>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] drivers: mmc: host: use devm_ioremap_resource()
  2013-05-12 14:44 [PATCH] drivers: mmc: host: use devm_ioremap_resource() Laurent Navet
@ 2013-05-14  0:39 ` Jingoo Han
  0 siblings, 0 replies; 2+ messages in thread
From: Jingoo Han @ 2013-05-14  0:39 UTC (permalink / raw)
  To: 'Laurent Navet', nico, cjb
  Cc: andrew, thomas.petazzoni, jason, linux-mmc, linux-kernel,
	Jingoo Han, Sachin Kamat

Sunday, May 12, 2013 11:44 PM, Laurent Navet wrote:
> 
> eplace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.

CC'ed Sachin Kamat

Fix the typo: eplace -> replace

> 
> Found with coccicheck and this semantic patch:
>  scripts/coccinelle/api/devm_ioremap_resource.cocci
> 
> Signed-off-by: Laurent Navet <laurent.navet@gmail.com>

It looks good.
Reviewed-by: Jingoo Han <jg1.han@samsung.com>

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-14  0:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-12 14:44 [PATCH] drivers: mmc: host: use devm_ioremap_resource() Laurent Navet
2013-05-14  0:39 ` Jingoo Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome