Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762238AbZLKBvg (ORCPT ); Thu, 10 Dec 2009 20:51:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762211AbZLKBvd (ORCPT ); Thu, 10 Dec 2009 20:51:33 -0500 Received: from exprod6og115.obsmtp.com ([64.18.1.35]:35664 "EHLO exprod6og115.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762202AbZLKBvc convert rfc822-to-8bit (ORCPT ); Thu, 10 Dec 2009 20:51:32 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Subject: [PATCH] fsldma.c: use resource_size() Date: Thu, 10 Dec 2009 20:51:37 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] fsldma.c: use resource_size() Thread-Index: Acp6BHmN7hw8QPMGTFG3NqBN+X+JlQ== From: "H Hartley Sweeten" To: "kernel list" Cc: , X-OriginalArrivalTime: 11 Dec 2009 01:51:38.0186 (UTC) FILETIME=[7A2F52A0:01CA7A04] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1482 Lines: 36 Use resource_size() for ioremap. Signed-off-by: H Hartley Sweeten Cc: Zhang Wei Cc: Li Yang --- diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 296f9e7..ca20a9c 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c @@ -1095,7 +1095,7 @@ static int __devinit fsl_dma_chan_probe(struct fsl_dma_device *fdev, new_fsl_chan->dev = fdev->dev; new_fsl_chan->reg_base = ioremap(new_fsl_chan->reg.start, - new_fsl_chan->reg.end - new_fsl_chan->reg.start + 1); + resource_size(&new_fsl_chan->reg)); new_fsl_chan->id = ((new_fsl_chan->reg.start - 0x100) & 0xfff) >> 7; if (new_fsl_chan->id >= FSL_DMA_MAX_CHANS_PER_DEVICE) { @@ -1196,8 +1196,7 @@ static int __devinit of_fsl_dma_probe(struct of_device *dev, dev_info(&dev->dev, "Probe the Freescale DMA driver for %s " "controller at 0x%llx...\n", match->compatible, (unsigned long long)fdev->reg.start); - fdev->reg_base = ioremap(fdev->reg.start, fdev->reg.end - - fdev->reg.start + 1); + fdev->reg_base = ioremap(fdev->reg.start, resource_size(&fdev->reg)); dma_cap_set(DMA_MEMCPY, fdev->common.cap_mask); dma_cap_set(DMA_INTERRUPT, fdev->common.cap_mask); -- 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/