Skip to content

Commit

Permalink
drivers/mmc/host/omap_hsmmc.c: use resource_size()
Browse files Browse the repository at this point in the history
Use resource_size().

Signed-off-by: Chris Ball <[email protected]>
Cc: Madhusudhan Chikkature <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
cjb authored and torvalds committed Mar 23, 2011
1 parent 2092014 commit 984b203
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/mmc/host/omap_hsmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2047,8 +2047,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)

res->start += pdata->reg_offset;
res->end += pdata->reg_offset;
res = request_mem_region(res->start, res->end - res->start + 1,
pdev->name);
res = request_mem_region(res->start, resource_size(res), pdev->name);
if (res == NULL)
return -EBUSY;

Expand Down Expand Up @@ -2287,7 +2286,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
err_alloc:
omap_hsmmc_gpio_free(pdata);
err:
release_mem_region(res->start, res->end - res->start + 1);
release_mem_region(res->start, resource_size(res));
return ret;
}

Expand Down Expand Up @@ -2324,7 +2323,7 @@ static int omap_hsmmc_remove(struct platform_device *pdev)

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res)
release_mem_region(res->start, res->end - res->start + 1);
release_mem_region(res->start, resource_size(res));
platform_set_drvdata(pdev, NULL);

return 0;
Expand Down

0 comments on commit 984b203

Please sign in to comment.