From patchwork Mon Dec 14 22:33:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartley Sweeten X-Patchwork-Id: 67405 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nBEMZ7pD030626 for ; Mon, 14 Dec 2009 22:35:07 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NKJVS-0001Yc-SH; Mon, 14 Dec 2009 22:35:06 +0000 Received: from sfi-mx-2.v28.ch3.sourceforge.com ([172.29.28.122] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NKJVR-0001YS-JS for spi-devel-general@lists.sourceforge.net; Mon, 14 Dec 2009 22:35:05 +0000 X-ACL-Warn: Received: from exprod6og115.obsmtp.com ([64.18.1.35]) by sfi-mx-2.v28.ch3.sourceforge.com with smtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1NKJVJ-00080m-W9 for spi-devel-general@lists.sourceforge.net; Mon, 14 Dec 2009 22:35:05 +0000 Received: from source ([63.240.6.3]) (using TLSv1) by exprod6ob115.postini.com ([64.18.5.12]) with SMTP ID DSNKSya9iosGOV47pUdiVPfgHXgfB12jwVcd@postini.com; Mon, 14 Dec 2009 14:34:57 PST Received: from d01smtp06.Mi8.com ([172.16.1.239]) by Outbound02.Mi8.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 Dec 2009 17:33:43 -0500 Received: from mi8nycmail19.Mi8.com ([172.16.7.219]) by d01smtp06.Mi8.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 Dec 2009 17:33:42 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Mon, 14 Dec 2009 17:33:43 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] spi_bfin5xx.c: use resource_size() Thread-Index: Acp9DX4086XAzgVWTpWuoRi7Fe9JkQ== From: "H Hartley Sweeten" To: "kernel list" , X-OriginalArrivalTime: 14 Dec 2009 22:33:42.0090 (UTC) FILETIME=[7D21E2A0:01CA7D0D] X-Sender-Verify: failed, postmaster X-Spam-Score: -0.2 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 1.4 NO_DNS_FOR_FROM DNS: Envelope sender has no MX or A DNS records 0.5 VA_SENDER_VERIFY_POSTMASTER Unable to Verify postmaster@domain.tld -2.1 AWL AWL: From: address is in the auto white-list X-Headers-End: 1NKJVJ-00080m-W9 Cc: David Brownell Subject: [spi-devel-general] [PATCH] spi_bfin5xx.c: use resource_size() X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces@lists.sourceforge.net diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 73e24ef..1d41058 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c @@ -1294,7 +1294,7 @@ static int __init bfin_spi_probe(struct platform_device *pdev) goto out_error_get_res; } - drv_data->regs_base = ioremap(res->start, (res->end - res->start + 1)); + drv_data->regs_base = ioremap(res->start, resource_size(res)); if (drv_data->regs_base == NULL) { dev_err(dev, "Cannot map IO\n"); status = -ENXIO;