* [PATCH] staging: imx-drm: use devm_ioremap_resource()
@ 2013-05-02 11:41 Laurent Navet
0 siblings, 0 replies; only message in thread
From: Laurent Navet @ 2013-05-02 11:41 UTC (permalink / raw)
To: gregkh, grant.likely, rob.herring
Cc: p.zabel, devel, linux-kernel, devicetree-discuss, Laurent Navet
Replace a call 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/staging/imx-drm/imx-tve.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c
index ac16344..a6efa8f6 100644
--- a/drivers/staging/imx-drm/imx-tve.c
+++ b/drivers/staging/imx-drm/imx-tve.c
@@ -638,11 +638,9 @@ static int imx_tve_probe(struct platform_device *pdev)
return -ENOENT;
}
- base = devm_request_and_ioremap(&pdev->dev, res);
- if (!base) {
- dev_err(&pdev->dev, "failed to remap memory region\n");
- return -ENOENT;
- }
+ base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(base))
+ return PTR_ERR(base);
tve_regmap_config.lock_arg = tve;
tve->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "tve", base,
--
1.7.10.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-05-02 11:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-02 11:41 [PATCH] staging: imx-drm: use devm_ioremap_resource() Laurent Navet
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).