From patchwork Tue Feb 25 13:36:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Barry Song <21cnbao@gmail.com> X-Patchwork-Id: 3716871 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 36482BF13A for ; Tue, 25 Feb 2014 13:36:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 68CD1201D3 for ; Tue, 25 Feb 2014 13:36:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A782201E4 for ; Tue, 25 Feb 2014 13:36:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752750AbaBYNgn (ORCPT ); Tue, 25 Feb 2014 08:36:43 -0500 Received: from mail-pd0-f178.google.com ([209.85.192.178]:43926 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752598AbaBYNgn (ORCPT ); Tue, 25 Feb 2014 08:36:43 -0500 Received: by mail-pd0-f178.google.com with SMTP id fp1so7801822pdb.37 for ; Tue, 25 Feb 2014 05:36:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ctixGojNFzMSmaGcLrCwVbeBlZBTKACTcIOe+ycsmlQ=; b=Lk3ofy8/eG72zHE8RSNIwD/Nn9yEfAe6UqkXzEbDGfn3KiFLg/VPoEa+hSITDqMTvt ccoe6vHqVbns/4uffkP90jFPk6/Hj0E89OY++nwIKu84PfbsNLPZX64yrzFS3sKQMOzB eniAlDG0rjvdcDzYdPt8cfyZc5RwGA+HyM7w9RWFvFZuK80VrLF/rVgA1sZCVAlYRKcX YjvjT1YX5Tdc4SGMEiCHyX4YLxX4+HHb+XIjA5jRy5jdg2HxJKM4J88yL20csba6BVuq wPDsN/ymImW+S0lFjlLuOiHbmgN/kM/Gty89za20wNzvmlX1wVomXthZAYU+bdVcBviB 8pJw== X-Received: by 10.66.231.104 with SMTP id tf8mr1833852pac.48.1393335402655; Tue, 25 Feb 2014 05:36:42 -0800 (PST) Received: from localhost.localdomain ([101.44.38.160]) by mx.google.com with ESMTPSA id un5sm143485997pab.3.2014.02.25.05.36.35 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 05:36:42 -0800 (PST) From: Barry Song <21cnbao@gmail.com> To: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org Cc: workgroup.linux@csr.com, Xianglong Du , Barry Song Subject: [PATCH] input: sirfsoc-onkey - set the capability of reporting KEY_POWER Date: Tue, 25 Feb 2014 21:36:14 +0800 Message-Id: <1393335375-1870-1-git-send-email-21cnbao@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Xianglong Du commit a1a7521064428fc1cf8 moved to report EV_KEY event(KEY_POWER) instead of reporting EV_PWR event(KEY_SUSPEND), but it didn't enable the capability, so the KEY_POWER will not be reported to userspace by input core. this patch fixes the issue. Signed-off-by: Xianglong Du Signed-off-by: Barry Song --- drivers/input/misc/sirfsoc-onkey.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/misc/sirfsoc-onkey.c b/drivers/input/misc/sirfsoc-onkey.c index 4d66c72..e4104f9 100644 --- a/drivers/input/misc/sirfsoc-onkey.c +++ b/drivers/input/misc/sirfsoc-onkey.c @@ -136,6 +136,7 @@ static int sirfsoc_pwrc_probe(struct platform_device *pdev) pwrcdrv->input->name = "sirfsoc pwrckey"; pwrcdrv->input->phys = "pwrc/input0"; pwrcdrv->input->evbit[0] = BIT_MASK(EV_KEY); + input_set_capability(pwrcdrv->input, EV_KEY, KEY_POWER); INIT_DELAYED_WORK(&pwrcdrv->work, sirfsoc_pwrc_report_event);