mfd: fix htc-egpio iomem resource handling using resource_size
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>
This commit is contained in:
parent
a313d758cc
commit
9427c34bc7
1 changed files with 1 additions and 1 deletions
|
@ -286,7 +286,7 @@ static int __init egpio_probe(struct platform_device *pdev)
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
if (!res)
|
if (!res)
|
||||||
goto fail;
|
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)
|
if (!ei->base_addr)
|
||||||
goto fail;
|
goto fail;
|
||||||
pr_debug("EGPIO phys=%08x virt=%p\n", (u32)res->start, ei->base_addr);
|
pr_debug("EGPIO phys=%08x virt=%p\n", (u32)res->start, ei->base_addr);
|
||||||
|
|
Loading…
Reference in a new issue