diff options
-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; |