public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] timeriomem-rng.c: use resource_size()
@ 2009-12-11  1:16 H Hartley Sweeten
  2009-12-11  1:34 ` Matt Mackall
  2009-12-11 14:32 ` Alexander Clouter
  0 siblings, 2 replies; 4+ messages in thread
From: H Hartley Sweeten @ 2009-12-11  1:16 UTC (permalink / raw)
  To: kernel list; +Cc: Alexander Clouter

Use resource_size() for ioremap.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Alexander Clouter <alex@digriz.org.uk>

---

diff --git a/drivers/char/hw_random/timeriomem-rng.c b/drivers/char/hw_random/timeriomem-rng.c
index a94e930..a8428e6 100644
--- a/drivers/char/hw_random/timeriomem-rng.c
+++ b/drivers/char/hw_random/timeriomem-rng.c
@@ -100,8 +100,7 @@ static int __devinit timeriomem_rng_probe(struct platform_device *pdev)
 
 	timeriomem_rng_data = pdev->dev.platform_data;
 
-	timeriomem_rng_data->address = ioremap(res->start,
-						res->end - res->start + 1);
+	timeriomem_rng_data->address = ioremap(res->start, resource_size(res));
 	if (!timeriomem_rng_data->address)
 		return -EIO;
  

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

end of thread, other threads:[~2009-12-11 15:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-11  1:16 [PATCH] timeriomem-rng.c: use resource_size() H Hartley Sweeten
2009-12-11  1:34 ` Matt Mackall
2009-12-11 15:15   ` Herbert Xu
2009-12-11 14:32 ` Alexander Clouter

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