From patchwork Mon Dec 14 22:37: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: 67407 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 nBEMbV1X030991 for ; Mon, 14 Dec 2009 22:37:31 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 1NKJXn-0001jP-Eb; Mon, 14 Dec 2009 22:37:31 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NKJXm-0001jI-0x for spi-devel-general@lists.sourceforge.net; Mon, 14 Dec 2009 22:37:30 +0000 X-ACL-Warn: Received: from exprod6ob117.obsmtp.com ([64.18.1.38] helo=psmtp.com) by sfi-mx-4.v28.ch3.sourceforge.com with smtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1NKJXg-0003Vn-FS for spi-devel-general@lists.sourceforge.net; Mon, 14 Dec 2009 22:37:29 +0000 Received: from source ([63.240.6.3]) (using TLSv1) by exprod6ob117.postini.com ([64.18.5.12]) with SMTP ID DSNKSya+GmQLomQD8Q18+c7Cwt+WcBIG+CsZ@postini.com; Mon, 14 Dec 2009 14:37:24 PST Received: from d01smtp07.Mi8.com ([172.16.1.114]) by Outbound02.Mi8.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 Dec 2009 17:37:14 -0500 Received: from mi8nycmail19.Mi8.com ([172.16.7.219]) by d01smtp07.Mi8.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 Dec 2009 17:37:13 -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:37:15 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] spi_mpc8xxx.c: use resource_size() Thread-Index: Acp9DfyVUWyJYxtGR1yRtHNculIjAQ== From: "H Hartley Sweeten" To: "kernel list" , X-OriginalArrivalTime: 14 Dec 2009 22:37:13.0802 (UTC) FILETIME=[FB5292A0:01CA7D0D] X-Sender-Verify: failed, postmaster X-Spam-Score: -0.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 -1.4 AWL AWL: From: address is in the auto white-list X-Headers-End: 1NKJXg-0003Vn-FS Cc: David Brownell Subject: [spi-devel-general] [PATCH] spi_mpc8xxx.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_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c index 930135d..d72db76 100644 --- a/drivers/spi/spi_mpc8xxx.c +++ b/drivers/spi/spi_mpc8xxx.c @@ -1013,7 +1013,7 @@ mpc8xxx_spi_probe(struct device *dev, struct resource *mem, unsigned int irq) init_completion(&mpc8xxx_spi->done); - mpc8xxx_spi->base = ioremap(mem->start, mem->end - mem->start + 1); + mpc8xxx_spi->base = ioremap(mem->start, resource_size(mem)); if (mpc8xxx_spi->base == NULL) { ret = -ENOMEM; goto err_ioremap;