diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2005-07-07 20:58:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-07 21:24:02 -0400 |
commit | 1df896aa239caf72483655290c40b21da536d85e (patch) | |
tree | 70c79db97537149646538339c442a913f41fd14f | |
parent | 04f3e5ea51248ff974a13ef2dd0145125c76204c (diff) |
[PATCH] dvb: usb: IR input fixes
o fixed usage of the correct number of events in keymapping-array
o better place for return
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-remote.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c index f4038bf21c91..fc7800f1743e 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c | |||
@@ -39,7 +39,7 @@ static void dvb_usb_read_remote_control(void *data) | |||
39 | d->last_event = event; | 39 | d->last_event = event; |
40 | case REMOTE_KEY_REPEAT: | 40 | case REMOTE_KEY_REPEAT: |
41 | deb_rc("key repeated\n"); | 41 | deb_rc("key repeated\n"); |
42 | input_event(&d->rc_input_dev, EV_KEY, event, 1); | 42 | input_event(&d->rc_input_dev, EV_KEY, d->last_event, 1); |
43 | input_event(&d->rc_input_dev, EV_KEY, d->last_event, 0); | 43 | input_event(&d->rc_input_dev, EV_KEY, d->last_event, 0); |
44 | input_sync(&d->rc_input_dev); | 44 | input_sync(&d->rc_input_dev); |
45 | break; | 45 | break; |
@@ -160,12 +160,12 @@ int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d, | |||
160 | break; | 160 | break; |
161 | } | 161 | } |
162 | /* See if we can match the raw key code. */ | 162 | /* See if we can match the raw key code. */ |
163 | for (i = 0; i < sizeof(keymap)/sizeof(struct dvb_usb_rc_key); i++) | 163 | for (i = 0; i < d->props.rc_key_map_size; i++) |
164 | if (keymap[i].custom == keybuf[1] && | 164 | if (keymap[i].custom == keybuf[1] && |
165 | keymap[i].data == keybuf[3]) { | 165 | keymap[i].data == keybuf[3]) { |
166 | *event = keymap[i].event; | 166 | *event = keymap[i].event; |
167 | *state = REMOTE_KEY_PRESSED; | 167 | *state = REMOTE_KEY_PRESSED; |
168 | break; | 168 | return 0; |
169 | } | 169 | } |
170 | deb_err("key mapping failed - no appropriate key found in keymapping\n"); | 170 | deb_err("key mapping failed - no appropriate key found in keymapping\n"); |
171 | break; | 171 | break; |