Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323413
b: refs/heads/master
c: 0672120
h: refs/heads/master
i:
  323411: 86b7a99
v: v3
  • Loading branch information
Henrik Rydberg committed Sep 19, 2012
1 parent ca0cd58 commit 2068bea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c75bf99271139ca7cb2d0cca3be11f1f7c59efd
refs/heads/master: 0672120a2ee7c533dfec6db7c3e43450f439e5ff
20 changes: 13 additions & 7 deletions trunk/drivers/input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,24 +240,30 @@ static void input_handle_event(struct input_dev *dev,
break;

case EV_KEY:
if (is_event_supported(code, dev->keybit, KEY_MAX) &&
!!test_bit(code, dev->key) != value) {
if (is_event_supported(code, dev->keybit, KEY_MAX)) {

/* auto-repeat bypasses state updates */
if (value == 2) {
disposition = INPUT_PASS_TO_HANDLERS;
break;
}

if (!!test_bit(code, dev->key) != !!value) {

if (value != 2) {
__change_bit(code, dev->key);
disposition = INPUT_PASS_TO_HANDLERS;

if (value)
input_start_autorepeat(dev, code);
else
input_stop_autorepeat(dev);
}

disposition = INPUT_PASS_TO_HANDLERS;
}
break;

case EV_SW:
if (is_event_supported(code, dev->swbit, SW_MAX) &&
!!test_bit(code, dev->sw) != value) {
!!test_bit(code, dev->sw) != !!value) {

__change_bit(code, dev->sw);
disposition = INPUT_PASS_TO_HANDLERS;
Expand All @@ -284,7 +290,7 @@ static void input_handle_event(struct input_dev *dev,

case EV_LED:
if (is_event_supported(code, dev->ledbit, LED_MAX) &&
!!test_bit(code, dev->led) != value) {
!!test_bit(code, dev->led) != !!value) {

__change_bit(code, dev->led);
disposition = INPUT_PASS_TO_ALL;
Expand Down

0 comments on commit 2068bea

Please sign in to comment.