[media] Drivers: staging: media: davinci_vpfe: Use resource_size function
authorAlexandru Gheorghiu <gheorghiuandru@gmail.com>
Sun, 10 Mar 2013 11:14:53 +0000 (08:14 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Mar 2013 16:50:00 +0000 (13:50 -0300)
Use resource_size function on resource object instead of explicit
computation.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/media/davinci_vpfe/dm365_ipipeif.c

index c8cae51d3d005d726725cabef330a3e1c9632182..b2f4ef84f3db692879c229d6ec730958778a7e66 100644 (file)
@@ -1065,7 +1065,6 @@ vpfe_ipipeif_cleanup(struct vpfe_ipipeif_device *ipipeif,
        iounmap(ipipeif->ipipeif_base_addr);
        res = platform_get_resource(pdev, IORESOURCE_MEM, 3);
        if (res)
-               release_mem_region(res->start,
-                                       res->end - res->start + 1);
+               release_mem_region(res->start, resource_size(res));
 
 }