drivers: mmc: host: use devm_ioremap_resource()
Subsystems (2)
PATCH 1/1 drivers: mmc: host: use devm_ioremap_resource()
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 <[email protected]>
--- drivers/mmc/host/mvsdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mmc/host/mvsdio.c +3 -3
@@ -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; }
Signature · 1 line
1.7.10.4
Quoted 2 lines · Laurent Navet
eplace a call to deprecated
devm_request_and_ioremapbydevm_ioremap_resource.
CC'ed Sachin Kamat
Fix the typo: eplace -> replace
Quoted 5 lines
Found with coccicheck and this semantic patch:
scripts/coccinelle/api/devm_ioremap_resource.cocciSigned-off-by Laurent Navet <[email protected]>
It looks good.
Reviewed-by Jingoo Han <[email protected]>
Best regards,
Jingoo Han
Quoted 23 lines
--- drivers/mmc/host/mvsdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/mmc/host/mvsdio.c +3
-4@@ -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