lkml.org 
[lkml]   [2009]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] timeriomem-rng.c: use resource_size()
From
Date
On Thu, 2009-12-10 at 20:16 -0500, H Hartley Sweeten wrote:
> Use resource_size() for ioremap.
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Alexander Clouter <alex@digriz.org.uk>

(Generally speaking, it's best to cc: obscure stuff to a maintainer.)

Looks good to me. Herbert?

Signed-off-by: Matt Mackall <mpm@selenic.com>

> ---
>
> 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;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/



--
http://selenic.com : development and support for Mercurial and Linux




\
 
 \ /
  Last update: 2009-12-11 02:37    [W:0.090 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site