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: 1230791 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 2049C3FD4F for ; Tue, 24 Jul 2012 09:11:20 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Stb1k-0001hq-0j; Tue, 24 Jul 2012 09:03:36 +0000 Received: from na3sys009aog120.obsmtp.com ([74.125.149.140]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1Stavo-00019f-F9 for linux-arm-kernel@lists.infradead.org; Tue, 24 Jul 2012 08:57:35 +0000 Received: from mail-lpp01m010-f49.google.com ([209.85.215.49]) (using TLSv1) by na3sys009aob120.postini.com ([74.125.148.12]) with SMTP ID DSNKUA5jdWh+igZiq9BdokZzSWD3dwfDZ/TL@postini.com; Tue, 24 Jul 2012 01:57:28 PDT Received: by laap9 with SMTP id p9so672582laa.36 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=ZzeHglyyNTrGCMckF0qZmSH6ES4Z5DKzvjBHSfiqukb2jtFTg2zjInsPdyE3ImE/20 jJUKnb4QGjF/kGwWWiEbgk7mEBXwlsoK1hMj/IqL0p05OSE3nYkW0nU46ByrN6W6Bq3v u9Y4S3x8Ruw2OpUvrQwP/Ud/eTget0u/VMNGuRrPCkqyb+/h0iaXYw1tUyPJHJTKTPxC FFriEHj2Hx9ZzNfZnX3LFDkILQtTnmXbPobyPHM5NSnG5m3042LSfuB4seHC0Ns4Gcqg nAy4v2Ob6VTWU80v13RKfFstE93cZiR4ut2UUzO8NJml5JSnSY0wVssRzu32AiG00xaP cmHg== 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 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: ALoCoQmS9RmP76C4qT5ruEiuswdEMeHyjaWr3Lpb0lMiFUeDEcEDWkpH0VBLPmvw6+px/7PTft3Y X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.140 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Linux OMAP Mailing List , Felipe Balbi , Linux ARM Kernel Mailing List X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 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 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