From patchwork Wed Jan 25 20:08:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Armstrong Skomra X-Patchwork-Id: 9537863 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6C9E66042B for ; Wed, 25 Jan 2017 20:09:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D04827D4D for ; Wed, 25 Jan 2017 20:09:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FCE027F9F; Wed, 25 Jan 2017 20:09:34 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 A2A0E27D4D for ; Wed, 25 Jan 2017 20:09:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751519AbdAYUJd (ORCPT ); Wed, 25 Jan 2017 15:09:33 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34349 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751787AbdAYUJc (ORCPT ); Wed, 25 Jan 2017 15:09:32 -0500 Received: by mail-pg0-f65.google.com with SMTP id 3so2782483pgj.1 for ; Wed, 25 Jan 2017 12:09:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9owFqbvkmg+Voi2XU9ZNrU/a3c9J34Sx8ar1Gb04lOk=; b=G6tyEWfzrTINm5CThxEb3eUl1waZIuFY+kn0RZalIE/oqgjbKJzl7RNJRj//PVQj0b aidCVncWJ+MBL0TrR0xGCag1jz8bgJjZKD2i9r1tYsxMo5R/Hve2+m+mgfesL5ZYhNYi G8ykdpGI0F8x2wwSXpkrJw1r+5lNuZGzEMQDH0RGBt0Vr0GVBLryX8WRPdxA+geslMiJ Kg2FKR52czeOTK0R70JX5jS6Dm+2xVkTfN51cQIAQQawuRVVXXB0AUJ/djrzx4By2YFa XvavTffOkCi6B/wkr6i+2Tbdd4dHB9ZHPFqBl11fKfC5xu4JUb3gXplJK9f6nLkHRzDV 7ntQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9owFqbvkmg+Voi2XU9ZNrU/a3c9J34Sx8ar1Gb04lOk=; b=iPv+DPXtMkVFYAEWg+ou6VOjK9pBjhzlPt+v4cObA5aQI8SlYbhgeeUj1EAO/ThnUQ Lc4mopdDVVzV0Hp2FZLIkTgYcwuKI2nngm8JpVSY85G7yHnGh0nHPDewLoHvEcF3YBP1 hD8rAql9D/xHlI1+VzEqM+JqyzFxbCh3pAdWSJeHEkxwupZ+pWL7hJwkngcc/5E7PUoR HXL+Ka1ha2bNsEetuJ2etrEqD7gQnP2e5sjuo+oXJ4p/szDqRttdy/MNDyNfnkxfI6gs wa1FEuMoGybAQzLAxuD3KFV+AYtLjmqvwI5RtGO0h9yc68dDePE5r+4KU9qHBkS9VRYL Sk7A== X-Gm-Message-State: AIkVDXKTQLg+tofsSL8YU4doKzMRC0jzZ4xajuDhaxOY+mSt42fjVssoUY0qp9KjR0Ja1g== X-Received: by 10.98.144.218 with SMTP id q87mr48642324pfk.51.1485374971863; Wed, 25 Jan 2017 12:09:31 -0800 (PST) Received: from localhost.localdomain (71-36-102-37.ptld.qwest.net. [71.36.102.37]) by smtp.googlemail.com with ESMTPSA id g64sm3066106pfc.57.2017.01.25.12.09.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Jan 2017 12:09:31 -0800 (PST) From: Aaron Armstrong Skomra To: linux-input@vger.kernel.org, jkosina@suse.cz, benjamin.tissoires@redhat.com, pinglinux@gmail.com, killertofu@gmail.com Cc: Aaron Armstrong Skomra , Aaron Skomra Subject: [PATCH 4/8] HID: wacom: generic: remove input_event_flag Date: Wed, 25 Jan 2017 12:08:38 -0800 Message-Id: <1485374922-3417-5-git-send-email-skomra@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1485374922-3417-1-git-send-email-skomra@gmail.com> References: <1485374922-3417-1-git-send-email-skomra@gmail.com> 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 Input_event_flag duplicates the information we track in wacom_wac->hid_data.inrange_state for the pad. Signed-off-by: Aaron Skomra --- drivers/hid/wacom_wac.c | 9 +-------- drivers/hid/wacom_wac.h | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index ef29f7a..f6825d2 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -1773,7 +1773,6 @@ static void wacom_wac_pad_event(struct hid_device *hdev, struct hid_field *field struct wacom *wacom = hid_get_drvdata(hdev); struct wacom_wac *wacom_wac = &wacom->wacom_wac; struct input_dev *input = wacom_wac->pad_input; - struct wacom_features *features = &wacom_wac->features; unsigned equivalent_usage = wacom_equivalent_usage(usage->hid); if (wacom_equivalent_usage(field->physical) == HID_DG_TABLETFUNCTIONKEY) { @@ -1785,7 +1784,6 @@ static void wacom_wac_pad_event(struct hid_device *hdev, struct hid_field *field break; default: - features->input_event_flag = true; input_event(input, usage->type, usage->code, value); break; } @@ -1823,20 +1821,15 @@ static void wacom_wac_pad_report(struct hid_device *hdev, { struct wacom *wacom = hid_get_drvdata(hdev); struct wacom_wac *wacom_wac = &wacom->wacom_wac; - struct wacom_features *features = &wacom_wac->features; struct input_dev *input = wacom_wac->pad_input; bool active = wacom_wac->hid_data.inrange_state != 0; /* report prox for expresskey events */ if (wacom_equivalent_usage(report->field[0]->physical) == HID_DG_TABLETFUNCTIONKEY) { - features->input_event_flag = true; input_event(input, EV_ABS, ABS_MISC, active ? PAD_DEVICE_ID : 0); - } - - if (features->input_event_flag) { - features->input_event_flag = false; input_sync(input); } + } static void wacom_wac_pen_usage_mapping(struct hid_device *hdev, diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h index d3482de..dac95ba 100644 --- a/drivers/hid/wacom_wac.h +++ b/drivers/hid/wacom_wac.h @@ -243,7 +243,6 @@ struct wacom_features { int pktlen; bool check_for_hid_type; int hid_type; - bool input_event_flag; }; struct wacom_shared {