From patchwork Mon Dec 14 22:40:05 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartley Sweeten X-Patchwork-Id: 67409 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 nBEMeJp1031447 for ; Mon, 14 Dec 2009 22:40:20 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 1NKJaV-0006cu-JA; Mon, 14 Dec 2009 22:40:19 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NKJaU-0006co-2o for spi-devel-general@lists.sourceforge.net; Mon, 14 Dec 2009 22:40:18 +0000 X-ACL-Warn: Received: from exprod6og107.obsmtp.com ([64.18.1.208]) by sfi-mx-4.v28.ch3.sourceforge.com with smtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1NKJaM-0003p7-HJ for spi-devel-general@lists.sourceforge.net; Mon, 14 Dec 2009 22:40:18 +0000 Received: from source ([63.240.6.3]) (using TLSv1) by exprod6ob107.postini.com ([64.18.5.12]) with SMTP ID DSNKSya+xEh6rPMhupwlqO7XM3t+nC8IL8jC@postini.com; Mon, 14 Dec 2009 14:40:10 PST Received: from d01smtp06.Mi8.com ([172.16.1.239]) by Outbound01.Mi8.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 Dec 2009 17:40:03 -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:40:03 -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:40:05 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] spi_sh_sci.c: use resource_size() Thread-Index: Acp9DmG+QpReHYZGTna8CphFhJU7EQ== From: "H Hartley Sweeten" To: "kernel list" , X-OriginalArrivalTime: 14 Dec 2009 22:40:03.0647 (UTC) FILETIME=[608EDCF0: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.208 listed in list.dnswl.org] 0.6 AWL AWL: From: address is in the auto white-list X-Headers-End: 1NKJaM-0003p7-HJ Cc: David Brownell Subject: [spi-devel-general] [PATCH] spi_sh_sci.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_sh_sci.c b/drivers/spi/spi_sh_sci.c index 7d36720..a65c12f 100644 --- a/drivers/spi/spi_sh_sci.c +++ b/drivers/spi/spi_sh_sci.c @@ -148,7 +148,7 @@ static int sh_sci_spi_probe(struct platform_device *dev) ret = -ENOENT; goto err1; } - sp->membase = ioremap(r->start, r->end - r->start + 1); + sp->membase = ioremap(r->start, resource_size(r)); if (!sp->membase) { ret = -ENXIO; goto err1;