aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2013-08-19 07:20:40 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-08-30 04:45:23 -0400
commitb1a9329cd5c4a26cdc2b12015ad055174a09e4ad (patch)
tree87b7187cf151e5c40620e9156f4670176c790397
parent9c29fba12e9657e4effccd124813639e4876971d (diff)
video: xilinxfb: replace devm_request_and_ioremap by devm_ioremap_resource
Use devm_ioremap_resource instead of devm_request_and_ioremap. This was done using the semantic patch scripts/coccinelle/api/devm_ioremap_resource.cocci The initialization of drvdata->regs_phys was manually moved lower, to take advantage of the NULL test on res performed by devm_ioremap_resource. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/xilinxfb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index f3d4a69e1e4e..236fd42370db 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -259,12 +259,12 @@ static int xilinxfb_assign(struct platform_device *pdev,
259 struct resource *res; 259 struct resource *res;
260 260
261 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 261 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
262 drvdata->regs_phys = res->start; 262 drvdata->regs = devm_ioremap_resource(&pdev->dev, res);
263 drvdata->regs = devm_request_and_ioremap(&pdev->dev, res); 263 if (IS_ERR(drvdata->regs)) {
264 if (!drvdata->regs) { 264 rc = PTR_ERR(drvdata->regs);
265 rc = -EADDRNOTAVAIL;
266 goto err_region; 265 goto err_region;
267 } 266 }
267 drvdata->regs_phys = res->start;
268 } 268 }
269 269
270 /* Allocate the framebuffer memory */ 270 /* Allocate the framebuffer memory */