diff options
author | Silviu-Mihai Popescu <silviupopescu1990@gmail.com> | 2013-03-18 15:06:20 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-23 11:35:44 -0300 |
commit | 69aa6f4ec669b9121057cc9e32cb10b5f744f6d6 (patch) | |
tree | 857fda5472ce4f8a5bc8fbfb0b3bc04f7c70b543 /drivers | |
parent | 0757f5c503a8b2eebc67c6bb8e3b88077d73049a (diff) | |
download | linux-3.10-69aa6f4ec669b9121057cc9e32cb10b5f744f6d6.tar.gz linux-3.10-69aa6f4ec669b9121057cc9e32cb10b5f744f6d6.tar.bz2 linux-3.10-69aa6f4ec669b9121057cc9e32cb10b5f744f6d6.zip |
[media] drivers: staging: davinci_vpfe: use resource_size()
This uses the resource_size() function instead of explicit computation.
Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_isif.c | 4 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_resizer.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c index 92853539cc0..05673ed45ce 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c @@ -1859,5 +1859,5 @@ void vpfe_ipipe_cleanup(struct vpfe_ipipe_device *ipipe, iounmap(ipipe->isp5_base_addr); res = platform_get_resource(pdev, IORESOURCE_MEM, 4); if (res) - release_mem_region(res->start, res->end - res->start + 1); + release_mem_region(res->start, resource_size(res)); } diff --git a/drivers/staging/media/davinci_vpfe/dm365_isif.c b/drivers/staging/media/davinci_vpfe/dm365_isif.c index ebeea72e176..c4a56608685 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_isif.c +++ b/drivers/staging/media/davinci_vpfe/dm365_isif.c @@ -1953,7 +1953,7 @@ static void isif_remove(struct vpfe_isif_device *isif, res = platform_get_resource(pdev, IORESOURCE_MEM, i); if (res) release_mem_region(res->start, - res->end - res->start + 1); + resource_size(res)); i++; } } @@ -2003,7 +2003,7 @@ int vpfe_isif_init(struct vpfe_isif_device *isif, struct platform_device *pdev) status = -ENOENT; goto fail_nobase_res; } - res_len = res->end - res->start + 1; + res_len = resource_size(res); res = request_mem_region(res->start, res_len, res->name); if (!res) { status = -EBUSY; diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.c b/drivers/staging/media/davinci_vpfe/dm365_resizer.c index 9cb0262b9b3..126f84c4cb6 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_resizer.c +++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.c @@ -1995,5 +1995,5 @@ vpfe_resizer_cleanup(struct vpfe_resizer_device *vpfe_rsz, res = platform_get_resource(pdev, IORESOURCE_MEM, 5); if (res) release_mem_region(res->start, - res->end - res->start + 1); + resource_size(res)); } |