From patchwork Sun Jul 22 16:50:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Schumacher X-Patchwork-Id: 10539357 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 77CE8174A for ; Sun, 22 Jul 2018 16:50:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A10728418 for ; Sun, 22 Jul 2018 16:50:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 587D828437; Sun, 22 Jul 2018 16:50:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E13402843B for ; Sun, 22 Jul 2018 16:50:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731470AbeGVRsL (ORCPT ); Sun, 22 Jul 2018 13:48:11 -0400 Received: from mout.gmx.net ([212.227.15.18]:40535 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731398AbeGVRsK (ORCPT ); Sun, 22 Jul 2018 13:48:10 -0400 Received: from p2520la.lan ([79.218.124.15]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MHoWj-1fif0i13nh-003g6i; Sun, 22 Jul 2018 18:50:53 +0200 From: Tim Schumacher Cc: dmitry.torokhov@gmail.com, timschumi@gmx.de, linux-input@vger.kernel.org Subject: [PATCH v2] input/iforce: Remove the BTN_DEAD assignment and usage Date: Sun, 22 Jul 2018 18:50:39 +0200 Message-Id: <20180722165039.5042-1-timschumi@gmx.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180721114822.4331-1-timschumi@gmx.de> References: <20180721114822.4331-1-timschumi@gmx.de> X-Provags-ID: V03:K1:CSCuRnC+nB95JYoLURf4Oh4kgPR+YnV4RhGvK1vXTBViJktl0Pj fHmPKMZk3haimFYT0usgTWR0a8myaODWIlURI7F6aXlD+dkAwD7fkHNpkNh+Y/hmes0UG3I RHq3JuhrFjEftbA/q7kW15i0DvxXFFi73gXhtv3DUcjUwhjpwsIeCHC007XNdK0NKdtJKTk HrCHlSSkip3Xj+p0o560Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:ayfpDhb0vnY=:fYhHVtC060qRjrp98jMeEF txH2TBe754U5eyEZjZ8zM6wEcsouE9+uLXbtA1d2Nydpsb+JFYdJSYXYfAGizKJu4H5Ahla6Y xvKTp3Kfhd8K1JT7QLXERoBaTF9Tb40upMA6B/w4gFs41bT45FGZRHoonYj6NeGi0ZRDDt2vz i7eFaHyxdFXD1VB9JaaXrbLNgZJsEGhp4nby8JzG5P8DN3eYXF6Ym4P0HdXLh0M7ePj0jwTHk uQN626cvlIun7lkwxxH6mTOvNnnQmhxYOwn/7mN/vQNxq5RX+NYMR9J0CpSNJnv0ZPtvG8Etz aPJuJWAX6JuDOh2Wz1KeWDTM91ha7HcQitwkMXAOasCTkF2Vw66tGWT8Q5YyTTvyhP+UfjJnz l7lDizvQvWk4BjRFBzM5RPtOD+hRPSmXXp6X/GYSODNUP6jY3HtTHSmyD0vk5aPoG9ja7csBX egQ0T4+XaD13SDZqeLku3Od+H3Xqi5Ioewr27Fa6NtKymIWVzi4iTilh0QziWamIVf0OPgXS1 AvuTkDiXP9d8R2RfqtKYWVsnhT+VuP4zsNuiEKcJzi8DpRIg8lgDFGQ5ghaAiphHwcX6oC++E emU4VWUq+4F2JXo3vp6qIPtR1muWMEH9IIhn9o72OszojF/6t12aBPVlISrbuI25ng2Q9iF3d Wl1yBBFCaUTtr4Jga6mWI3yPc6DfU86L/5CCNi5UhzpQCzcslKhMv3k4osW0z6PS9dZMZ37sl dQfZeTUCSvmcezB4OOA40q+JZ/0slrvSpkn5NObbxyyQKk8CI1iJdySJa8k= To: unlisted-recipients:; (no To-header on input) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The nonexistent button assigned as BTN_DEAD is constantly creating false inputs (as it gets triggered on every joystick status update), making the task of (as an example) assigning controls unnecessarily hard. Signed-off-by: Tim Schumacher --- drivers/input/joystick/iforce/iforce-main.c | 1 - drivers/input/joystick/iforce/iforce-packets.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c index 054abed0fdc1..a4ab58633136 100644 --- a/drivers/input/joystick/iforce/iforce-main.c +++ b/drivers/input/joystick/iforce/iforce-main.c @@ -388,7 +388,6 @@ int iforce_init_device(struct iforce *iforce) for (i = 0; iforce->type->btn[i] >= 0; i++) set_bit(iforce->type->btn[i], input_dev->keybit); - set_bit(BTN_DEAD, input_dev->keybit); for (i = 0; iforce->type->abs[i] >= 0; i++) { diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index 08f98f2eaf88..d929c6f05275 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c @@ -220,7 +220,6 @@ void iforce_process_packet(struct iforce *iforce, u16 cmd, unsigned char *data) break; case 0x02: /* status report */ - input_report_key(dev, BTN_DEAD, data[0] & 0x02); input_sync(dev); /* Check if an effect was just started or stopped */