aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Rueegg <felix.rueegg@gmail.com>2013-10-06 18:03:26 +0200
committerFelix Rueegg <felix.rueegg@gmail.com>2013-10-06 18:03:26 +0200
commit2d05ee44b999a72c90ea65fadb19642ec8764a30 (patch)
tree0c7b671311930c5feae41a3391e79bcf7f22c0f4
parentee9baa2dd8a8a5d99b6943707d32e32e0687f20d (diff)
Fix to ignore first hid report with recent kernel versions. There was a change that even if raw_event returns 1, the events from the first report will still get sent. https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=b1a1442a23776756b254b69786848a94d92445ba
-rw-r--r--src/kernel/hid-lg-g710-plus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/hid-lg-g710-plus.c b/src/kernel/hid-lg-g710-plus.c
index 57876d8..f3f2577 100644
--- a/src/kernel/hid-lg-g710-plus.c
+++ b/src/kernel/hid-lg-g710-plus.c
@@ -128,8 +128,9 @@ static int lg_g710_plus_raw_event(struct hid_device *hdev, struct hid_report *re
struct lg_g710_plus_data* g710_data = lg_g710_plus_get_data(hdev);
/* Ignore the first event. It will send a key down event for certain buttons, but never the key up event*/
if (g710_data->first_event) {
+ memset(data, 0, size);
g710_data->first_event= 0;
- return 1;
+ return 0;
}
switch(report->id) {
case 3: return lg_g710_plus_extra_key_event(hdev, report, data, size);