All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tc6393xb.c: use resource_size()
@ 2009-12-12  0:11 H Hartley Sweeten
  2010-01-05 19:03 ` Samuel Ortiz
  0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2009-12-12  0:11 UTC (permalink / raw)
  To: kernel list; +Cc: ian, sameo

Use resource_size() for ioremap.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Molton <ian@mnementh.co.uk>
Cc: Samuel Ortiz <sameo@linux.intel.com>

---

diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index 1429a73..50b1610 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -610,7 +610,7 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
 	if (ret)
 		goto err_request_scr;
 
-	tc6393xb->scr = ioremap(rscr->start, rscr->end - rscr->start + 1);
+	tc6393xb->scr = ioremap(rscr->start, resource_size(rscr));
 	if (!tc6393xb->scr) {
 		ret = -ENOMEM;
 		goto err_ioremap; 

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

end of thread, other threads:[~2010-01-05 19:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-12  0:11 [PATCH] tc6393xb.c: use resource_size() H Hartley Sweeten
2010-01-05 19: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.