From patchwork Tue Aug 24 08:54:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrik Rydberg X-Patchwork-Id: 125851 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7O8tQdB027637 for ; Tue, 24 Aug 2010 08:55:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753962Ab0HXIz0 (ORCPT ); Tue, 24 Aug 2010 04:55:26 -0400 Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]:33800 "EHLO ch-smtp01.sth.basefarm.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752204Ab0HXIzZ (ORCPT ); Tue, 24 Aug 2010 04:55:25 -0400 Received: from c83-248-196-134.bredband.comhem.se ([83.248.196.134]:43666 helo=alnilam) by ch-smtp01.sth.basefarm.net with smtp (Exim 4.71) (envelope-from ) id 1OnpHX-0006Mk-61; Tue, 24 Aug 2010 10:55:00 +0200 Received: by alnilam (sSMTP sendmail emulation); Tue, 24 Aug 2010 10:54:57 +0200 From: "Henrik Rydberg" To: Jiri Kosina Cc: Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Stephane Chatty , Henrik Rydberg Subject: [PATCH] hid: Add a hid quirk for input sync override Date: Tue, 24 Aug 2010 10:54:44 +0200 Message-Id: <1282640084-19217-1-git-send-email-rydberg@euromail.se> X-Mailer: git-send-email 1.7.1 X-Originating-IP: 83.248.196.134 X-Scan-Result: No virus found in message 1OnpHX-0006Mk-61. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1OnpHX-0006Mk-61 7d82cbfe46c51993d46e8c692e1fb1d1 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 (demeter.kernel.org [140.211.167.41]); Tue, 24 Aug 2010 08:55:27 +0000 (UTC) diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 69d152e..9d97934 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -656,6 +656,9 @@ void hidinput_report_event(struct hid_device *hid, struct hid_report *report) { struct hid_input *hidinput; + if (hid->quirks & HID_QUIRK_NO_INPUT_SYNC) + return; + list_for_each_entry(hidinput, &hid->inputs, list) input_sync(hidinput->input); } diff --git a/include/linux/hid.h b/include/linux/hid.h index 895001f..8029883 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -315,6 +315,7 @@ struct hid_item { #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 #define HID_QUIRK_NO_INIT_REPORTS 0x20000000 #define HID_QUIRK_NO_IGNORE 0x40000000 +#define HID_QUIRK_NO_INPUT_SYNC 0x80000000 /* * This is the global environment of the parser. This information is