From patchwork Mon Dec 14 21:18:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartley Sweeten X-Patchwork-Id: 41142 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 83E2AB7088 for ; Tue, 15 Dec 2009 08:19:36 +1100 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NKIJC-0000kD-OP; Mon, 14 Dec 2009 21:18:22 +0000 Received: from exprod6ob109.obsmtp.com ([64.18.1.22] helo=psmtp.com) by bombadil.infradead.org with smtps (Exim 4.69 #1 (Red Hat Linux)) id 1NKIJ6-0000NV-06 for linux-mtd@lists.infradead.org; Mon, 14 Dec 2009 21:18:20 +0000 Received: from source ([63.240.6.3]) (using TLSv1) by exprod6ob109.postini.com ([64.18.5.12]) with SMTP ID DSNKSyarlpPmix8LDTslRcu5aNhSpx7q6VqC@postini.com; Mon, 14 Dec 2009 13:18:15 PST Received: from d01smtp03.Mi8.com ([172.16.1.24]) by Outbound01.Mi8.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 Dec 2009 16:18:13 -0500 Received: from mi8nycmail19.Mi8.com ([172.16.7.219]) by d01smtp03.Mi8.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 Dec 2009 16:18:13 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: [PATCH] excite_nandflash.c: user resource_size() Date: Mon, 14 Dec 2009 16:18:15 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] excite_nandflash.c: user resource_size() Thread-Index: Acp9AvLJj5tFqik7TsKLA1AzisKEHg== From: "H Hartley Sweeten" To: "kernel list" , X-OriginalArrivalTime: 14 Dec 2009 21:18:13.0557 (UTC) FILETIME=[F1EA9650:01CA7D02] X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20091214_161816_227424_AC0F2777 X-CRM114-Status: GOOD ( 10.04 ) X-Spam-Score: -4.0 (----) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (-4.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -4.0 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [64.18.1.22 listed in list.dnswl.org] Cc: David Woodhouse X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Use resource_size(). Signed-off-by: H Hartley Sweeten David Woodhouse diff --git a/drivers/mtd/nand/excite_nandflash.c b/drivers/mtd/nand/excite_nandflash.c index 72446fb..bd323e4 100644 --- a/drivers/mtd/nand/excite_nandflash.c +++ b/drivers/mtd/nand/excite_nandflash.c @@ -79,7 +79,7 @@ excite_nand_map_regs(struct platform_device *d, const char *basename) excite_nand_get_resource(d, IORESOURCE_MEM, basename); if (r) - result = ioremap_nocache(r->start, r->end + 1 - r->start); + result = ioremap_nocache(r->start, resource_size(r)); return result; }