public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/mtd/nand/sh_flctl.c: use resource_size()
@ 2009-12-14 21:59 H Hartley Sweeten
  2009-12-16  0:48 ` Yoshihiro Shimoda
  0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2009-12-14 21:59 UTC (permalink / raw)
  To: kernel list, linux-mtd; +Cc: David Woodhouse, shimoda.yoshihiro

Use resource_size().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>

---

diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
index 02bef21..4260ab7 100644
--- a/drivers/mtd/nand/sh_flctl.c
+++ b/drivers/mtd/nand/sh_flctl.c
@@ -797,7 +797,7 @@ static int __init flctl_probe(struct platform_device *pdev)
 		goto err;
 	}
 
-	flctl->reg = ioremap(res->start, res->end - res->start + 1);
+	flctl->reg = ioremap(res->start, resource_size(res));
 	if (flctl->reg == NULL) {
 		printk(KERN_ERR "%s: ioremap error.\n", __func__);
 		ret = -ENOMEM; 

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

* Re: [PATCH] drivers/mtd/nand/sh_flctl.c: use resource_size()
  2009-12-14 21:59 [PATCH] drivers/mtd/nand/sh_flctl.c: use resource_size() H Hartley Sweeten
@ 2009-12-16  0:48 ` Yoshihiro Shimoda
  0 siblings, 0 replies; 2+ messages in thread
From: Yoshihiro Shimoda @ 2009-12-16  0:48 UTC (permalink / raw)
  To: H Hartley Sweeten; +Cc: kernel list, linux-mtd, David Woodhouse

H Hartley Sweeten wrote:
> Use resource_size().
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: David Woodhouse <dwmw2@infradead.org>
> Cc: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>

Thank you for your patch!

Acked-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>

Thanks,
Yoshihiro Shimoda


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

end of thread, other threads:[~2009-12-16  0:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-14 21:59 [PATCH] drivers/mtd/nand/sh_flctl.c: use resource_size() H Hartley Sweeten
2009-12-16  0:48 ` Yoshihiro Shimoda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox