From patchwork Wed Jan 12 09:41:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Langlais X-Patchwork-Id: 473601 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0C9hgtr032178 for ; Wed, 12 Jan 2011 09:43:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751474Ab1ALJnl (ORCPT ); Wed, 12 Jan 2011 04:43:41 -0500 Received: from eu1sys200aog118.obsmtp.com ([207.126.144.145]:52404 "EHLO eu1sys200aog118.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751322Ab1ALJnk (ORCPT ); Wed, 12 Jan 2011 04:43:40 -0500 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob118.postini.com ([207.126.147.11]) with SMTP ID DSNKTS13ymyDinHNfQJ+Fz1739W6XnMZQsce@postini.com; Wed, 12 Jan 2011 09:43:40 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 13C0B59; Wed, 12 Jan 2011 09:43:36 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DA7A91C35; Wed, 12 Jan 2011 09:43:35 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id BF50124C2F3; Wed, 12 Jan 2011 10:43:30 +0100 (CET) Received: from localhost.localdomain (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.2.254.0; Wed, 12 Jan 2011 10:43:35 +0100 From: Philippe Langlais To: Cc: , , Philippe Langlais Subject: [PATCH] input: replace request_irq by request_any_context_irq in keyboard GPIO driver Date: Wed, 12 Jan 2011 10:41:32 +0100 Message-ID: <1294825292-24134-2-git-send-email-philippe.langlais@stericsson.com> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <1294825292-24134-1-git-send-email-philippe.langlais@stericsson.com> References: <1294825292-24134-1-git-send-email-philippe.langlais@stericsson.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 12 Jan 2011 09:43:54 +0000 (UTC) diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 6069abe..eb30063 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -322,7 +322,7 @@ static void gpio_keys_report_event(struct gpio_button_data *bdata) struct gpio_keys_button *button = bdata->button; struct input_dev *input = bdata->input; unsigned int type = button->type ?: EV_KEY; - int state = (gpio_get_value(button->gpio) ? 1 : 0) ^ button->active_low; + int state = (gpio_get_value_cansleep(button->gpio) ? 1 : 0) ^ button->active_low; input_event(input, type, button->code, !!state); input_sync(input); @@ -410,8 +410,8 @@ static int __devinit gpio_keys_setup_key(struct platform_device *pdev, if (!button->can_disable) irqflags |= IRQF_SHARED; - error = request_irq(irq, gpio_keys_isr, irqflags, desc, bdata); - if (error) { + error = request_any_context_irq(irq, gpio_keys_isr, irqflags, desc, bdata); + if (error < 0) { dev_err(dev, "Unable to claim irq %d; error %d\n", irq, error); goto fail3;