From: Matt Mackall on
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(a)visionengravers.com>
> Cc: Alexander Clouter <alex(a)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(a)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(a)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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Alexander Clouter on
Hi,

* H Hartley Sweeten <hartleys(a)visionengravers.com> [2009-12-10 20:16:54-0500]:
>
> Use resource_size() for ioremap.
>
> Signed-off-by: H Hartley Sweeten <hsweeten(a)visionengravers.com>
> Cc: Alexander Clouter <alex(a)digriz.org.uk>
>
Acked-by: Alexander Clouter <alex(a)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;

--
Alexander Clouter
..sigmonster says: Every time I think I know where it's at, they move it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Herbert Xu on
On Thu, Dec 10, 2009 at 07:34:43PM -0600, Matt Mackall wrote:
> 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(a)visionengravers.com>
> > Cc: Alexander Clouter <alex(a)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(a)selenic.com>

Patch applied. Thanks!
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert(a)gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/