diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2013-03-22 13:53:57 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-03-27 09:09:40 -0400 |
commit | 4c43755506ececbe903585265aa8408e937620a1 (patch) | |
tree | fd0dc3c3bcc35c6c3f1f22171ec5077b30ce3a4e /drivers/hid | |
parent | 570637dc8eeb2faba06228d497ff40bb019bcc93 (diff) |
HID: multitouch: fix touchpad buttons
Commit "HID: multitouch: use the callback "report" instead..." breaks the
buttons of touchpads following the HID multitouch specification.
The buttons were emmitted through hid-input, but as now the events
are generated only in hid-multitouch, the buttons are not emmitted anymore.
The input_event() call is far much simpler than the hid-input one as
many of the different tests do not apply to multitouch touchpads.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-multitouch.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 7a1ebb867cf4..82e9211b3ca9 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
@@ -621,6 +621,7 @@ static void mt_process_mt_event(struct hid_device *hid, struct hid_field *field, | |||
621 | { | 621 | { |
622 | struct mt_device *td = hid_get_drvdata(hid); | 622 | struct mt_device *td = hid_get_drvdata(hid); |
623 | __s32 quirks = td->mtclass.quirks; | 623 | __s32 quirks = td->mtclass.quirks; |
624 | struct input_dev *input = field->hidinput->input; | ||
624 | 625 | ||
625 | if (hid->claimed & HID_CLAIMED_INPUT) { | 626 | if (hid->claimed & HID_CLAIMED_INPUT) { |
626 | switch (usage->hid) { | 627 | switch (usage->hid) { |
@@ -670,13 +671,16 @@ static void mt_process_mt_event(struct hid_device *hid, struct hid_field *field, | |||
670 | break; | 671 | break; |
671 | 672 | ||
672 | default: | 673 | default: |
674 | if (usage->type) | ||
675 | input_event(input, usage->type, usage->code, | ||
676 | value); | ||
673 | return; | 677 | return; |
674 | } | 678 | } |
675 | 679 | ||
676 | if (usage->usage_index + 1 == field->report_count) { | 680 | if (usage->usage_index + 1 == field->report_count) { |
677 | /* we only take into account the last report. */ | 681 | /* we only take into account the last report. */ |
678 | if (usage->hid == td->last_slot_field) | 682 | if (usage->hid == td->last_slot_field) |
679 | mt_complete_slot(td, field->hidinput->input); | 683 | mt_complete_slot(td, input); |
680 | 684 | ||
681 | if (field->index == td->last_field_index | 685 | if (field->index == td->last_field_index |
682 | && td->num_received >= td->num_expected) | 686 | && td->num_received >= td->num_expected) |