From patchwork Tue Mar 3 02:05:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kim kyuwon X-Patchwork-Id: 9632 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2322kDv023700 for ; Tue, 3 Mar 2009 02:05:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750772AbZCCCFu (ORCPT ); Mon, 2 Mar 2009 21:05:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753164AbZCCCFt (ORCPT ); Mon, 2 Mar 2009 21:05:49 -0500 Received: from wf-out-1314.google.com ([209.85.200.168]:45818 "EHLO wf-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750772AbZCCCFt (ORCPT ); Mon, 2 Mar 2009 21:05:49 -0500 Received: by wf-out-1314.google.com with SMTP id 28so3029809wfa.4 for ; Mon, 02 Mar 2009 18:05:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Vb4NddZNTFQnoSDzTBlb7TpjhYvU788XNhHJv65vIhk=; b=HDp+96t/tzFjcGHGeWmuQppQTAjggqOdpjlJboPQ4iIbgPkhrewSK/GAFTZZFbwxzX TmacZ/xauD4hGlg1cj+o7rRJZH/0lrV06I1I7+druIwN3zw6P+EEwyx5b5cYTMTPux1c CzhBQjOFkC2nyxC/TEkzgHN/xcIjiVqHzeKDk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=CLTgyougH46HgUBBRsLYcO0uZQmUf42jplmbtxQKDIC6SWAJJ92/ZW2rpKMlPtaDLf cFuQRZ+POk93wTdRhssEFjqwsDnh3K0KbWWUAd/r5kw24Ayofo0I1oaZ9BO6HP43wz9A xT3Q5PNiUlCJbM4HkfLdMbcmr5OdvAfTorfOI= MIME-Version: 1.0 Received: by 10.142.237.19 with SMTP id k19mr3338047wfh.68.1236045947402; Mon, 02 Mar 2009 18:05:47 -0800 (PST) Date: Tue, 3 Mar 2009 11:05:47 +0900 Message-ID: <4d34a0a70903021805l56ebe7e2u277fcdebe01f5693@mail.gmail.com> Subject: [PATCH 1/1] OMAP: GPIO: Remove enable_irq_wake() and disable_irq_wake() in _set_gpio_wakeup() function From: Kim Kyuwon To: OMAP Cc: Juha Yrjola , David Brownell , =?EUC-KR?B?udqw5rnO?= Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Current omap_irq_chip variable (in arch/arm/mach-omap2/irq.c) doesn't have set_wake function. So invoking enable_irq_wake() and disable_irq_wake() for the MPU IRQs always returns -ENXIO and sometime it generates warning message(Unbalanced IRQ %d wake disable). Actual enabling and disable IRQ wakeup can be done by enable_irq() and disable_irq(). Signed-off-by: Kim Kyuwon --- arch/arm/plat-omap/gpio.c | 14 ++++---------- 1 files changed, 4 insertions(+), 10 deletions(-) #endif @@ -856,13 +853,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) return -EINVAL; } spin_lock_irqsave(&bank->lock, flags); - if (enable) { + if (enable) bank->suspend_wakeup |= (1 << gpio); - enable_irq_wake(bank->irq); - } else { - disable_irq_wake(bank->irq); + else bank->suspend_wakeup &= ~(1 << gpio); - } spin_unlock_irqrestore(&bank->lock, flags); return 0; #endif diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index f856a90..798a8cd 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -837,13 +837,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) case METHOD_MPUIO: case METHOD_GPIO_1610: spin_lock_irqsave(&bank->lock, flags); - if (enable) { + if (enable) bank->suspend_wakeup |= (1 << gpio); - enable_irq_wake(bank->irq); - } else { - disable_irq_wake(bank->irq); + else bank->suspend_wakeup &= ~(1 << gpio); - } spin_unlock_irqrestore(&bank->lock, flags); return 0;