aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorPhilipp Zabel <philipp.zabel@gmail.com>2009-02-04 15:27:48 -0500
committerSamuel Ortiz <samuel@sortiz.org>2009-02-17 03:00:14 -0500
commit9427c34bc72f05b519e8466f27c38a3327bae157 (patch)
treed7674df9599f540f266a5dd37c3157daf2a15d2f /drivers/mfd
parenta313d758cc7956d7f1e7a727c8fa571b6468fabf (diff)
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>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/htc-egpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c
index 194df7b8256c..aa266e1f69b2 100644
--- a/drivers/mfd/htc-egpio.c
+++ b/drivers/mfd/htc-egpio.c
@@ -286,7 +286,7 @@ static int __init egpio_probe(struct platform_device *pdev)
286 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 286 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
287 if (!res) 287 if (!res)
288 goto fail; 288 goto fail;
289 ei->base_addr = ioremap_nocache(res->start, res->end - res->start); 289 ei->base_addr = ioremap_nocache(res->start, resource_size(res));
290 if (!ei->base_addr) 290 if (!ei->base_addr)
291 goto fail; 291 goto fail;
292 pr_debug("EGPIO phys=%08x virt=%p\n", (u32)res->start, ei->base_addr); 292 pr_debug("EGPIO phys=%08x virt=%p\n", (u32)res->start, ei->base_addr);