From patchwork Wed Jul 6 15:52:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Miao X-Patchwork-Id: 949922 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 p66Fr3Aj008456 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 6 Jul 2011 15:53:24 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QeUPH-0004RP-Kh; Wed, 06 Jul 2011 15:52:55 +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 1QeUPH-0000ix-8F; Wed, 06 Jul 2011 15:52:55 +0000 Received: from mail-iy0-f177.google.com ([209.85.210.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QeUPC-0000hk-T4 for linux-arm-kernel@lists.infradead.org; Wed, 06 Jul 2011 15:52:51 +0000 Received: by iyn15 with SMTP id 15so62880iyn.36 for ; Wed, 06 Jul 2011 08:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=OvWSgmAgOtAW+MOTHQ3s0IDa5z0TbPP0CgtKnfPQFWs=; b=lEDa+XknGijVgFi1uysWaodq3Dz20HLAtbOtFdClCAgQBIgXHE9qJlmRUvENt5oao+ 7yBIbwYmk4aBds5vLA/O2PBWiBIpp+q+Z/+grrb16c4PA5eI5m5NUbV6FnbpqUirTo+K 2QhJsrqQsWtTG5GSBjs+coT8fXTwk/YtfvgLw= Received: by 10.231.14.13 with SMTP id e13mr19917iba.186.1309967567861; Wed, 06 Jul 2011 08:52:47 -0700 (PDT) Received: from localhost.localdomain ([202.115.1.35]) by mx.google.com with ESMTPS id fw9sm4931186ibb.47.2011.07.06.08.52.44 (version=SSLv3 cipher=OTHER); Wed, 06 Jul 2011 08:52:47 -0700 (PDT) From: Eric Miao To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] ARM: pxa: fix PGSR register address calculation Date: Wed, 6 Jul 2011 23:52:27 +0800 Message-Id: <1309967549-3394-1-git-send-email-eric.y.miao@gmail.com> X-Mailer: git-send-email 1.7.4.1 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110706_115251_096997_88D94D6C X-CRM114-Status: GOOD ( 14.99 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (eric.y.miao[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service Cc: Eric Miao , stable@kernel.org, Paul Parsons 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]); Wed, 06 Jul 2011 15:53:24 +0000 (UTC) From: Paul Parsons The file mfp-pxa2xx.c defines a macro, PGSR(), which translates a gpio bank number to a PGSR register address. The function pxa2xx_mfp_suspend() erroneously passed in a gpio number instead of a gpio bank number. Signed-off-by: Paul Parsons Cc: stable@kernel.org Signed-off-by: Eric Miao --- arch/arm/mach-pxa/mfp-pxa2xx.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c index 87ae312..b27544b 100644 --- a/arch/arm/mach-pxa/mfp-pxa2xx.c +++ b/arch/arm/mach-pxa/mfp-pxa2xx.c @@ -347,9 +347,9 @@ static int pxa2xx_mfp_suspend(void) if ((gpio_desc[i].config & MFP_LPM_KEEP_OUTPUT) && (GPDR(i) & GPIO_bit(i))) { if (GPLR(i) & GPIO_bit(i)) - PGSR(i) |= GPIO_bit(i); + PGSR(gpio_to_bank(i)) |= GPIO_bit(i); else - PGSR(i) &= ~GPIO_bit(i); + PGSR(gpio_to_bank(i)) &= ~GPIO_bit(i); } }