Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753308AbZKWSUU (ORCPT ); Mon, 23 Nov 2009 13:20:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752593AbZKWSUT (ORCPT ); Mon, 23 Nov 2009 13:20:19 -0500 Received: from mail.gmx.net ([213.165.64.20]:53191 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751544AbZKWSUS (ORCPT ); Mon, 23 Nov 2009 13:20:18 -0500 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX1/7p6kJ/dH7Y9e7j2RKOTpkyqFFEwfkkdXuubeL8q cKOCKSsDebnIsG Date: Mon, 23 Nov 2009 19:20:34 +0100 (CET) From: Guennadi Liakhovetski To: H Hartley Sweeten cc: linux-kernel@vger.kernel.org Subject: Re: drivers/dma/ipu/ipu_idmac.c: use resource_size() In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Y-GMX-Trusted: 0 X-FuHaFi: 0.52 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1539 Lines: 46 On Mon, 23 Nov 2009, H Hartley Sweeten wrote: > Use resource_size() for ioremap. > > Signed-off-by: H Hartley Sweeten > Cc: Guennadi Liakhovetski Acked-by: Guennadi Liakhovetski > > --- > > diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c > index 9a5bc1a..bfa2126 100644 > --- a/drivers/dma/ipu/ipu_idmac.c > +++ b/drivers/dma/ipu/ipu_idmac.c > @@ -1771,16 +1771,14 @@ static int __init ipu_probe(struct platform_device *pdev) > ipu_data.irq_fn, ipu_data.irq_err, ipu_data.irq_base); > > /* Remap IPU common registers */ > - ipu_data.reg_ipu = ioremap(mem_ipu->start, > - mem_ipu->end - mem_ipu->start + 1); > + ipu_data.reg_ipu = ioremap(mem_ipu->start, resource_size(mem_ipu)); > if (!ipu_data.reg_ipu) { > ret = -ENOMEM; > goto err_ioremap_ipu; > } > > /* Remap Image Converter and Image DMA Controller registers */ > - ipu_data.reg_ic = ioremap(mem_ic->start, > - mem_ic->end - mem_ic->start + 1); > + ipu_data.reg_ic = ioremap(mem_ic->start, resource_size(mem_ic)); > if (!ipu_data.reg_ic) { > ret = -ENOMEM; > goto err_ioremap_ic; > --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- 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/