diff options
author | Julia Lawall <julia@diku.dk> | 2011-04-22 16:11:22 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-05-24 03:08:59 -0400 |
commit | d2f6b7f7aaa245d6d96f9b3a95fc258f20c9e0a8 (patch) | |
tree | d6e790472d235efdecf07f999d2e0ba2bb052bab /drivers/video/sm501fb.c | |
parent | 683e7cdc207f71eef3ff46f5d36ec505c65fbbc6 (diff) |
drivers/video/sm501fb.c: 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/sm501fb.c')
-rw-r--r-- | drivers/video/sm501fb.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c index 56ef6b3a9851..87f0be1e78b5 100644 --- a/drivers/video/sm501fb.c +++ b/drivers/video/sm501fb.c | |||
@@ -1625,22 +1625,22 @@ static int sm501fb_start(struct sm501fb_info *info, | |||
1625 | return 0; /* everything is setup */ | 1625 | return 0; /* everything is setup */ |
1626 | 1626 | ||
1627 | err_mem_res: | 1627 | err_mem_res: |
1628 | release_resource(info->fbmem_res); | 1628 | release_mem_region(info->fbmem_res->start, |
1629 | kfree(info->fbmem_res); | 1629 | resource_size(info->fbmem_res)); |
1630 | 1630 | ||
1631 | err_regs2d_map: | 1631 | err_regs2d_map: |
1632 | iounmap(info->regs2d); | 1632 | iounmap(info->regs2d); |
1633 | 1633 | ||
1634 | err_regs2d_res: | 1634 | err_regs2d_res: |
1635 | release_resource(info->regs2d_res); | 1635 | release_mem_region(info->regs2d_res->start, |
1636 | kfree(info->regs2d_res); | 1636 | resource_size(info->regs2d_res)); |
1637 | 1637 | ||
1638 | err_regs_map: | 1638 | err_regs_map: |
1639 | iounmap(info->regs); | 1639 | iounmap(info->regs); |
1640 | 1640 | ||
1641 | err_regs_res: | 1641 | err_regs_res: |
1642 | release_resource(info->regs_res); | 1642 | release_mem_region(info->regs_res->start, |
1643 | kfree(info->regs_res); | 1643 | resource_size(info->regs_res)); |
1644 | 1644 | ||
1645 | err_release: | 1645 | err_release: |
1646 | return ret; | 1646 | return ret; |
@@ -1652,16 +1652,16 @@ static void sm501fb_stop(struct sm501fb_info *info) | |||
1652 | sm501_unit_power(info->dev->parent, SM501_GATE_DISPLAY, 0); | 1652 | sm501_unit_power(info->dev->parent, SM501_GATE_DISPLAY, 0); |
1653 | 1653 | ||
1654 | iounmap(info->fbmem); | 1654 | iounmap(info->fbmem); |
1655 | release_resource(info->fbmem_res); | 1655 | release_mem_region(info->fbmem_res->start, |
1656 | kfree(info->fbmem_res); | 1656 | resource_size(info->fbmem_res)); |
1657 | 1657 | ||
1658 | iounmap(info->regs2d); | 1658 | iounmap(info->regs2d); |
1659 | release_resource(info->regs2d_res); | 1659 | release_mem_region(info->regs2d_res->start, |
1660 | kfree(info->regs2d_res); | 1660 | resource_size(info->regs2d_res)); |
1661 | 1661 | ||
1662 | iounmap(info->regs); | 1662 | iounmap(info->regs); |
1663 | release_resource(info->regs_res); | 1663 | release_mem_region(info->regs_res->start, |
1664 | kfree(info->regs_res); | 1664 | resource_size(info->regs_res)); |
1665 | } | 1665 | } |
1666 | 1666 | ||
1667 | static int sm501fb_init_fb(struct fb_info *fb, | 1667 | static int sm501fb_init_fb(struct fb_info *fb, |