From patchwork Wed Nov 24 21:01:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gardiner X-Patchwork-Id: 354321 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 oAOL1iUU023014 for ; Wed, 24 Nov 2010 21:01:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756601Ab0KXVBr (ORCPT ); Wed, 24 Nov 2010 16:01:47 -0500 Received: from na3sys009aog111.obsmtp.com ([74.125.149.205]:56194 "HELO na3sys009aog111.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756333Ab0KXVBq (ORCPT ); Wed, 24 Nov 2010 16:01:46 -0500 Received: from source ([209.85.213.169]) by na3sys009aob111.postini.com ([74.125.148.12]) with SMTP ID DSNKTO19Og/ukVF7/xe2a7/bkVQJi/SGcqRH@postini.com; Wed, 24 Nov 2010 13:01:46 PST Received: by yxl31 with SMTP id 31so934610yxl.0 for ; Wed, 24 Nov 2010 13:01:46 -0800 (PST) Received: by 10.151.27.6 with SMTP id e6mr1664986ybj.211.1290632505986; Wed, 24 Nov 2010 13:01:45 -0800 (PST) Received: from localhost.localdomain ([206.191.47.130]) by mx.google.com with ESMTPS id v8sm65841yba.14.2010.11.24.13.01.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 24 Nov 2010 13:01:45 -0800 (PST) From: Ben Gardiner To: Gabor Juhos Cc: linux-input@vger.kernel.org Subject: [PATCH WIP 3/6] fixup gpio_buttons: detect and error-out if a button is requested for wakeup Date: Wed, 24 Nov 2010 16:01:37 -0500 Message-Id: <3c1b59654d0cb56680662eae33db0eff3add546c.1290631852.git.bengardiner@nanometrics.ca> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: <1290524800-21419-10-git-send-email-juhosg@openwrt.org> 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.3 (demeter1.kernel.org [140.211.167.41]); Wed, 24 Nov 2010 21:01:48 +0000 (UTC) diff --git a/drivers/input/misc/gpio_buttons.c b/drivers/input/misc/gpio_buttons.c index c34e978..0859b4d 100644 --- a/drivers/input/misc/gpio_buttons.c +++ b/drivers/input/misc/gpio_buttons.c @@ -136,6 +136,11 @@ static int __devinit gpio_buttons_probe(struct platform_device *pdev) unsigned int gpio = button->gpio; unsigned int type = button->type ?: EV_KEY; + if (button->wakeup) { + dev_err(dev, DRV_NAME " does not support wakeup\n"); + goto err_free_gpio; + } + error = gpio_request(gpio, button->desc ? button->desc : DRV_NAME); if (error) {