From patchwork Mon Dec 14 21:33:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartley Sweeten X-Patchwork-Id: 41147 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 9995FB6EF7 for ; Tue, 15 Dec 2009 08:34:51 +1100 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NKIY0-0003q2-1Q; Mon, 14 Dec 2009 21:33:40 +0000 Received: from exprod6og101.obsmtp.com ([64.18.1.181]) by bombadil.infradead.org with smtps (Exim 4.69 #1 (Red Hat Linux)) id 1NKIXt-0003hg-AO for linux-mtd@lists.infradead.org; Mon, 14 Dec 2009 21:33:37 +0000 Received: from source ([63.240.6.3]) (using TLSv1) by exprod6ob101.postini.com ([64.18.5.12]) with SMTP ID DSNKSyavLMC6cwv44nXhAutbka6vipg3h9rT@postini.com; Mon, 14 Dec 2009 13:33:33 PST Received: from D01SMTP04.Mi8.com ([172.16.1.243]) by Outbound01.Mi8.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 Dec 2009 16:33:31 -0500 Received: from mi8nycmail19.Mi8.com ([172.16.7.219]) by D01SMTP04.Mi8.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 Dec 2009 16:33:31 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: [PATCH] mxc_nand.c: use resource_size() Date: Mon, 14 Dec 2009 16:33:32 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] mxc_nand.c: use resource_size() Thread-Index: Acp9BRXPQAYteWmxRBqHz400RhG+iA== From: "H Hartley Sweeten" To: "kernel list" , X-OriginalArrivalTime: 14 Dec 2009 21:33:31.0262 (UTC) FILETIME=[14E941E0:01CA7D05] X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20091214_163333_554555_3949B759 X-CRM114-Status: GOOD ( 10.21 ) 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.181 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/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 65b26d5..fb58894 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -920,7 +920,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) goto eres; } - host->regs = ioremap(res->start, res->end - res->start + 1); + host->regs = ioremap(res->start, resource_size(res)); if (!host->regs) { err = -ENOMEM; goto eres;