All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd/htc-egpio: fix iomem resource handling using resource_size
@ 2009-01-31 20:47 Philipp Zabel
  2009-02-06 14:03 ` Samuel Ortiz
  0 siblings, 1 reply; 2+ messages in thread
From: Philipp Zabel @ 2009-01-31 20:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: Samuel Ortiz, Philipp Zabel

Fixes an off-by-one error in the iomem resource mapping.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
---
 drivers/mfd/htc-egpio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c
index 1a4d046..e9b0745 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)
 	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);
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-06 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-31 20:47 [PATCH] mfd/htc-egpio: fix iomem resource handling using resource_size Philipp Zabel
2009-02-06 14:03 ` Samuel Ortiz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.