From patchwork Fri Jan 8 06:41:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 7982791 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CD0759F54F for ; Fri, 8 Jan 2016 06:41:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ECD6E20172 for ; Fri, 8 Jan 2016 06:41:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7483520149 for ; Fri, 8 Jan 2016 06:41:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750766AbcAHGlS (ORCPT ); Fri, 8 Jan 2016 01:41:18 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:36792 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750702AbcAHGlR (ORCPT ); Fri, 8 Jan 2016 01:41:17 -0500 Received: by mail-pf0-f175.google.com with SMTP id n128so5377983pfn.3; Thu, 07 Jan 2016 22:41:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=DUFt3XGpwh7a5AoIDXuUgtvx+IhPcphgGTFa8R4rTLc=; b=qLGqY1dgdtYMPbpKF6RBqpKxN05s5oFt0uV4GAxSJi9RVKKP/p5++kZwG0U8UdNjEu bZ3OldUXNuEdzeD+8ylnXLViGim43BW8r5NlXHo+Aeajsw8MAK/JoKfR5g7OoQZ8uI0R ZXfRAh88iEX0aQ1wDSZAq2zggYO9I0vRwdZzK+UUD4phJlw//TVJlHfth8w57o1T/TNU dT0kDlWXd2T7st3ZLvL1NTyDZngcod4HP7q+OPyI5f94bjOpTlsCmyJIktyotclEXq5S asrpARVdiE+9vvF3kFdkmrdLvFUjwbYUaQXtuv+tVvQW2aVarQDWGhjEcTKkizi05Yxh e6BQ== X-Received: by 10.98.14.80 with SMTP id w77mr2150663pfi.152.1452235277500; Thu, 07 Jan 2016 22:41:17 -0800 (PST) Received: from dtor-ws ([2620:0:1000:1301:3438:d31f:8a03:32e6]) by smtp.gmail.com with ESMTPSA id d21sm1960321pfj.32.2016.01.07.22.41.16 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 07 Jan 2016 22:41:16 -0800 (PST) Date: Thu, 7 Jan 2016 22:41:14 -0800 From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: Tony Lindgren , Aaro Koskinen , Janusz Krzysztofik , linux-kernel@vger.kernel.org Subject: [PATCH] Input: omap-keypad - remove adjusting of scan delay Message-ID: <20160108064114.GA30877@dtor-ws> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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 As of 35f8679f577ae5673a778598bcbe7b45cbec8923 ("Input: omap-keypad - remove dead check") we no longer declare keypresses as spurious, therefore we can use constant delay between scans. Suggested-by: Janusz Krzysztofik Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/omap-keypad.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index e0d72c8..d115acf 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c @@ -133,7 +133,6 @@ static void omap_kp_tasklet(unsigned long data) unsigned int row_shift = get_count_order(omap_kp_data->cols); unsigned char new_state[8], changed, key_down = 0; int col, row; - int spurious = 0; /* check for any changes */ omap_kp_scan_keypad(omap_kp_data, new_state); @@ -170,12 +169,9 @@ static void omap_kp_tasklet(unsigned long data) memcpy(keypad_state, new_state, sizeof(keypad_state)); if (key_down) { - int delay = HZ / 20; /* some key is pressed - keep irq disabled and use timer * to poll the keypad */ - if (spurious) - delay = 2 * HZ; - mod_timer(&omap_kp_data->timer, jiffies + delay); + mod_timer(&omap_kp_data->timer, jiffies + HZ / 20); } else { /* enable interrupts */ omap_writew(0, OMAP1_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT);