Skip to content

Commit

Permalink
[media] davinci vpbe: Use resource_size()
Browse files Browse the repository at this point in the history
 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>
  • Loading branch information
Thomas Meyer authored and Mauro Carvalho Chehab committed Sep 21, 2011
1 parent 096b703 commit fbc09d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/davinci/vpbe_osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit fbc09d3

Please sign in to comment.