aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/sh7760fb.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2011-04-22 20:11:21 +0000
committerPaul Mundt <lethal@linux-sh.org>2011-05-24 16:08:54 +0900
commit683e7cdc207f71eef3ff46f5d36ec505c65fbbc6 (patch)
treeab1c2ebbb3c3b5faae511a84685e3ad6b5654e9a /drivers/video/sh7760fb.c
parent94cd1ae2fd251fd8206c043ce91a99a45439a116 (diff)
drivers/video: Convert release_resource to release_mem_region
Request_mem_region should be used with release_mem_region, not release_resource. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @s exists@ expression e1,e2,e3,e4,e; @@ *e4 = request_mem_region(e1,e2,e3) ... when != e4 = e *release_resource(e4); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/sh7760fb.c')
-rw-r--r--drivers/video/sh7760fb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/sh7760fb.c b/drivers/video/sh7760fb.c
index 8fe19582c46..45e47d84716 100644
--- a/drivers/video/sh7760fb.c
+++ b/drivers/video/sh7760fb.c
@@ -551,8 +551,7 @@ out_unmap:
free_irq(par->irq, &par->vsync);
iounmap(par->base);
out_res:
- release_resource(par->ioarea);
- kfree(par->ioarea);
+ release_mem_region(res->start, resource_size(res));
out_fb:
framebuffer_release(info);
return ret;
@@ -570,8 +569,7 @@ static int __devexit sh7760fb_remove(struct platform_device *dev)
if (par->irq >= 0)
free_irq(par->irq, par);
iounmap(par->base);
- release_resource(par->ioarea);
- kfree(par->ioarea);
+ release_mem_region(par->ioarea->start, resource_size(par->ioarea));
framebuffer_release(info);
platform_set_drvdata(dev, NULL);