Skip to content

Commit

Permalink
mfd: fix htc-egpio iomem resource handling using resource_size
Browse files Browse the repository at this point in the history
Fixes an off-by-one error in the iomem resource mapping.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
  • Loading branch information
Philipp Zabel authored and Samuel Ortiz committed Feb 17, 2009
1 parent a313d75 commit 9427c34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mfd/htc-egpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ static int __init egpio_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
goto fail;
ei->base_addr = ioremap_nocache(res->start, res->end - res->start);
ei->base_addr = ioremap_nocache(res->start, resource_size(res));
if (!ei->base_addr)
goto fail;
pr_debug("EGPIO phys=%08x virt=%p\n", (u32)res->start, ei->base_addr);
Expand Down

0 comments on commit 9427c34

Please sign in to comment.