Skip to content

Commit

Permalink
[media] drivers: staging: davinci_vpfe: use resource_size()
Browse files Browse the repository at this point in the history
This uses the resource_size() function instead of explicit computation.

Signed-off-by: Silviu-Mihai Popescu <[email protected]>
Acked-by: Lad, Prabhakar <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
silviupopescu authored and Mauro Carvalho Chehab committed Mar 23, 2013
1 parent 0757f5c commit 69aa6f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/media/davinci_vpfe/dm365_ipipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
4 changes: 2 additions & 2 deletions drivers/staging/media/davinci_vpfe/dm365_isif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
}
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/media/davinci_vpfe/dm365_resizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

0 comments on commit 69aa6f4

Please sign in to comment.