From patchwork Fri Jul 22 19:47:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 1000872 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6MJlqwl028869 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 22 Jul 2011 19:48:18 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QkLhD-00067m-QV; Fri, 22 Jul 2011 19:47:39 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QkLhD-0000uI-Ei; Fri, 22 Jul 2011 19:47:39 +0000 Received: from na3sys009aog126.obsmtp.com ([74.125.149.155]) by canuck.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1QkLh9-0000tf-Bk for linux-arm-kernel@lists.infradead.org; Fri, 22 Jul 2011 19:47:36 +0000 Received: from mail-ew0-f50.google.com ([209.85.215.50]) (using TLSv1) by na3sys009aob126.postini.com ([74.125.148.12]) with SMTP ID DSNKTinT06Af4ZXl2tgQGRBsGGcaJjg9qBrn@postini.com; Fri, 22 Jul 2011 12:47:35 PDT Received: by mail-ew0-f50.google.com with SMTP id 10so2209421ewy.37 for ; Fri, 22 Jul 2011 12:47:31 -0700 (PDT) Received: by 10.204.142.193 with SMTP id r1mr588660bku.106.1311364051610; Fri, 22 Jul 2011 12:47:31 -0700 (PDT) Received: from localhost (cs181221225.pp.htv.fi [82.181.221.225]) by mx.google.com with ESMTPS id f27sm599695bku.1.2011.07.22.12.47.30 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Jul 2011 12:47:30 -0700 (PDT) From: Felipe Balbi To: Linux Kernel Mailing List Subject: [PATCH 1/2] of: address: use resource_size helper Date: Fri, 22 Jul 2011 22:47:21 +0300 Message-Id: <1311364042-8325-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.6 Organization: Texas Instruments\n X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110722_154735_635568_2D2367A6 X-CRM114-Status: GOOD ( 13.96 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.155 listed in list.dnswl.org] Cc: Russell King , Tony Lindgren , devicetree-discuss@lists.ozlabs.org, Felipe Balbi , Grant Likely , Linux OMAP Mailing List , Linux ARM Kernel Mailing List X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 22 Jul 2011 19:48:18 +0000 (UTC) that should be the approved way of calculating the size of resources. No functional changes. Cc: Grant Likely Signed-off-by: Felipe Balbi --- drivers/of/address.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/of/address.c b/drivers/of/address.c index deefc0c..6e7b2cf 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -624,6 +624,6 @@ void __iomem *of_iomap(struct device_node *np, int index) if (of_address_to_resource(np, index, &res)) return NULL; - return ioremap(res.start, 1 + res.end - res.start); + return ioremap(res.start, resource_size(&res)); } EXPORT_SYMBOL(of_iomap);