From patchwork Mon Dec 14 22:43:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartley Sweeten X-Patchwork-Id: 67413 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 nBEMi2tG031997 for ; Mon, 14 Dec 2009 22:44:02 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NKJe6-0006od-5c; Mon, 14 Dec 2009 22:44:02 +0000 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NKJe4-0006oS-CO for spi-devel-general@lists.sourceforge.net; Mon, 14 Dec 2009 22:44:00 +0000 X-ACL-Warn: Received: from exprod6og101.obsmtp.com ([64.18.1.181]) by sfi-mx-3.v28.ch3.sourceforge.com with smtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1NKJdu-0003FI-UI for spi-devel-general@lists.sourceforge.net; Mon, 14 Dec 2009 22:44:00 +0000 Received: from source ([63.240.6.3]) (using TLSv1) by exprod6ob101.postini.com ([64.18.5.12]) with SMTP ID DSNKSya/nfMcnqIz/EFntctTpDETzrRSuaC/@postini.com; Mon, 14 Dec 2009 14:43:50 PST Received: from D01SMTP04.Mi8.com ([172.16.1.243]) by Outbound02.Mi8.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 Dec 2009 17:43:40 -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 17:43:40 -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:43:42 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] spi_txx9.c: use resource_size() Thread-Index: Acp9DuMANhFZ3lj9TkCca6AL3Md+Hg== From: "H Hartley Sweeten" To: "kernel list" , X-OriginalArrivalTime: 14 Dec 2009 22:43:40.0301 (UTC) FILETIME=[E1B1A3D0:01CA7D0E] X-Sender-Verify: failed, postmaster X-Spam-Score: -2.9 (--) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.5 VA_SENDER_VERIFY_POSTMASTER Unable to Verify postmaster@domain.tld -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] 0.6 AWL AWL: From: address is in the auto white-list X-Headers-End: 1NKJdu-0003FI-UI Cc: anemo@mba.ocn.ne.jp, David Brownell Subject: [spi-devel-general] [PATCH] spi_txx9.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_txx9.c b/drivers/spi/spi_txx9.c index 19f7562..dfa024b 100644 --- a/drivers/spi/spi_txx9.c +++ b/drivers/spi/spi_txx9.c @@ -375,12 +375,10 @@ static int __init txx9spi_probe(struct platform_device *dev) res = platform_get_resource(dev, IORESOURCE_MEM, 0); if (!res) goto exit_busy; - if (!devm_request_mem_region(&dev->dev, - res->start, res->end - res->start + 1, + if (!devm_request_mem_region(&dev->dev, res->start, resource_size(res), "spi_txx9")) goto exit_busy; - c->membase = devm_ioremap(&dev->dev, - res->start, res->end - res->start + 1); + c->membase = devm_ioremap(&dev->dev, res->start, resource_size(res)); if (!c->membase) goto exit_busy;