Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758078AbZLKOiK (ORCPT ); Fri, 11 Dec 2009 09:38:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757610AbZLKOiI (ORCPT ); Fri, 11 Dec 2009 09:38:08 -0500 Received: from chipmunk.wormnet.eu ([195.195.131.226]:54011 "EHLO chipmunk.wormnet.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757561AbZLKOiH (ORCPT ); Fri, 11 Dec 2009 09:38:07 -0500 X-Greylist: delayed 367 seconds by postgrey-1.27 at vger.kernel.org; Fri, 11 Dec 2009 09:38:07 EST Date: Fri, 11 Dec 2009 14:32:04 +0000 From: Alexander Clouter To: H Hartley Sweeten Cc: kernel list Subject: Re: [PATCH] timeriomem-rng.c: use resource_size() Message-ID: <20091211143204.GW993@chipmunk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: diGriz X-URL: http://www.digriz.org.uk/ X-JabberID: alex@digriz.org.uk User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1232 Lines: 33 Hi, * H Hartley Sweeten [2009-12-10 20:16:54-0500]: > > Use resource_size() for ioremap. > > Signed-off-by: H Hartley Sweeten > Cc: Alexander Clouter > Acked-by: Alexander Clouter > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/