diff options
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r-- | drivers/hid/hid-input.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index f80b57142cd4..36be431888fb 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -921,6 +921,11 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
921 | set_bit(KEY_VOLUMEDOWN, input->keybit); | 921 | set_bit(KEY_VOLUMEDOWN, input->keybit); |
922 | } | 922 | } |
923 | 923 | ||
924 | if (usage->type == EV_KEY) { | ||
925 | set_bit(EV_MSC, input->evbit); | ||
926 | set_bit(MSC_SCAN, input->mscbit); | ||
927 | } | ||
928 | |||
924 | hid_resolv_event(usage->type, usage->code); | 929 | hid_resolv_event(usage->type, usage->code); |
925 | 930 | ||
926 | dbg_hid_line("\n"); | 931 | dbg_hid_line("\n"); |
@@ -1043,6 +1048,9 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct | |||
1043 | input_event(input, usage->type, last_key, 0); | 1048 | input_event(input, usage->type, last_key, 0); |
1044 | } | 1049 | } |
1045 | } | 1050 | } |
1051 | /* report the usage code as scancode if the key status has changed */ | ||
1052 | if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value) | ||
1053 | input_event(input, EV_MSC, MSC_SCAN, usage->hid); | ||
1046 | 1054 | ||
1047 | input_event(input, usage->type, usage->code, value); | 1055 | input_event(input, usage->type, usage->code, value); |
1048 | 1056 | ||