From: H Hartley Sweeten Date: Wed, 8 Jun 2011 13:05:51 +0000 (+0800) Subject: hwrng: timeriomem - use resource_size X-Git-Tag: firefly_0821_release~3680^2~4958^2~28 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=033590fc9d38bb82b904439daada78f930c070db;p=firefly-linux-kernel-4.4.55.git hwrng: timeriomem - use resource_size Signed-off-by: H Hartley Sweeten Acked-by: Matt Mackall Signed-off-by: Herbert Xu --- diff --git a/drivers/char/hw_random/timeriomem-rng.c b/drivers/char/hw_random/timeriomem-rng.c index a94e930575f2..a8428e6f64a9 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;