From patchwork Tue Jul 24 08:54:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 1230621 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id DA5693FD4F for ; Tue, 24 Jul 2012 08:57:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752458Ab2GXI52 (ORCPT ); Tue, 24 Jul 2012 04:57:28 -0400 Received: from na3sys009aog115.obsmtp.com ([74.125.149.238]:50445 "EHLO na3sys009aog115.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751965Ab2GXI50 (ORCPT ); Tue, 24 Jul 2012 04:57:26 -0400 Received: from mail-lpp01m010-f51.google.com ([209.85.215.51]) (using TLSv1) by na3sys009aob115.postini.com ([74.125.148.12]) with SMTP ID DSNKUA5jdWh+igZiq9BdokZzSWD3dwfDZ/TL@postini.com; Tue, 24 Jul 2012 01:57:26 PDT Received: by lagw12 with SMTP id w12so666060lag.24 for ; Tue, 24 Jul 2012 01:57:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=sHtZ30w9dQ/rmiJ3aZbj8Ug5n8yjEsI0c0g0DOxlomE=; b=QJsm8TVfMeIEZP+lqcW05e1M/cmxIAFBiHVmfkJ5jNbqOoKgmKccMR7NZu9+9SLtzf F+gKBeuWEavCWwqP/FPfA2KVlAjhrIaPL0fybdGtxqSnJlVI04auxQw/Sz5vaLqJA4cL OpGLdRDBw2/QtaZ6TNI/zScxjDLYLO2zq2HIENf+FPPxAr0piJ9lspul762gF/44tcbW CoM09tp1duQXRKWIVGYXH1hczw2ytevo2uQv6gujCV0/Xybh87mYFPCvoONE7hn6ZiJL FslS0/D9qP+PYEhN4Pr6yCe22TYJJKqg6TB0TP1qdk5m6/rEwJR4amA7+9fbmm8atvhQ Ojgw== Received: by 10.152.146.163 with SMTP id td3mr20948265lab.26.1343120243715; Tue, 24 Jul 2012 01:57:23 -0700 (PDT) Received: from localhost (cs78217178.pp.htv.fi. [62.78.217.178]) by mx.google.com with ESMTPS id sm7sm15936955lab.5.2012.07.24.01.57.22 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Jul 2012 01:57:23 -0700 (PDT) From: Felipe Balbi To: Tony Lindgren Cc: Linux OMAP Mailing List , Linux ARM Kernel Mailing List , Felipe Balbi Subject: [PATCH 5/5] arm: omap: debug-leds: switch to resource_size() Date: Tue, 24 Jul 2012 11:54:02 +0300 Message-Id: <1343120042-16695-6-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.11 In-Reply-To: <1343120042-16695-1-git-send-email-balbi@ti.com> References: <1343120042-16695-1-git-send-email-balbi@ti.com> X-Gm-Message-State: ALoCoQllY0zwYO2Nmfh1ON+JqeO3TRQYEm63kGbXlsqZx+Bx3Ub1ZFwb/J5RJbOnXVSK93F75WLi Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org instead of hardcoding the address space size, we can calculate it using resource_size() helper. Signed-off-by: Felipe Balbi --- arch/arm/plat-omap/debug-leds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c index 08fbb85..ebc0317 100644 --- a/arch/arm/plat-omap/debug-leds.c +++ b/arch/arm/plat-omap/debug-leds.c @@ -272,7 +272,7 @@ static int __devinit fpga_probe(struct platform_device *pdev) if (!iomem) return -ENODEV; - fpga = ioremap(iomem->start, H2P2_DBG_FPGA_SIZE); + fpga = ioremap(iomem->start, resource_size(iomem)); __raw_writew(~0, &fpga->leds); #ifdef CONFIG_LEDS