diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-remote.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c index b6dbc2b538d4..edde87c6aa3a 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c | |||
@@ -22,6 +22,19 @@ static int dvb_usb_getkeycode(struct input_dev *dev, | |||
22 | *keycode = keymap[i].event; | 22 | *keycode = keymap[i].event; |
23 | return 0; | 23 | return 0; |
24 | } | 24 | } |
25 | |||
26 | /* | ||
27 | * If is there extra space, returns KEY_RESERVED, | ||
28 | * otherwise, input core won't let dvb_usb_setkeycode | ||
29 | * to work | ||
30 | */ | ||
31 | for (i = 0; i < d->props.rc_key_map_size; i++) | ||
32 | if (keymap[i].event == KEY_RESERVED || | ||
33 | keymap[i].event == KEY_UNKNOWN) { | ||
34 | *keycode = KEY_RESERVED; | ||
35 | return 0; | ||
36 | } | ||
37 | |||
25 | return -EINVAL; | 38 | return -EINVAL; |
26 | } | 39 | } |
27 | 40 | ||