[media] davinci vpbe: Use resource_size()
authorThomas Meyer <thomas@m3y3r.de>
Sat, 6 Aug 2011 07:48:32 +0000 (04:48 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 21 Sep 2011 17:10:34 +0000 (14:10 -0300)
 Use resource_size function on resource object
 instead of explicit computation.

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/resource_size.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/davinci/vpbe_osd.c

index 5352884998f5bb7542157ee0d938ae262815617e..ceccf43025189743960ac711bae3cf8c01b4cda6 100644 (file)
@@ -1162,7 +1162,7 @@ static int osd_probe(struct platform_device *pdev)
                goto free_mem;
        }
        osd->osd_base_phys = res->start;
-       osd->osd_size = res->end - res->start + 1;
+       osd->osd_size = resource_size(res);
        if (!request_mem_region(osd->osd_base_phys, osd->osd_size,
                                MODULE_NAME)) {
                dev_err(osd->dev, "Unable to reserve OSD MMIO region\n");