aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-07-31 10:24:57 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 15:43:43 -0400
commit34abf2194499571b2efa6b4aface8c0ea0c47ce1 (patch)
treee2698d258ad65a7878fbc4b6c9e3de81228fb3ef /drivers/media/dvb
parent0172fea3c0cf55b61bc94738db3ece513264774c (diff)
V4L/DVB: dvb-usb: get rid of struct dvb_usb_rc_key
dvb-usb has its own IR handle code. Now that we have a Remote Controller subsystem, we should start using it. So, remove this struct, in favor of the similar struct defined at the RC subsystem. This is a big, but trivial patch. It is a 3 line delect, plus lots of rename on several dvb-usb files. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/dvb-usb/a800.c2
-rw-r--r--drivers/media/dvb/dvb-usb/af9005-remote.c4
-rw-r--r--drivers/media/dvb/dvb-usb/af9005.h2
-rw-r--r--drivers/media/dvb/dvb-usb/af9015.c6
-rw-r--r--drivers/media/dvb/dvb-usb/af9015.h18
-rw-r--r--drivers/media/dvb/dvb-usb/anysee.c6
-rw-r--r--drivers/media/dvb/dvb-usb/az6027.c2
-rw-r--r--drivers/media/dvb/dvb-usb/cinergyT2-core.c2
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c18
-rw-r--r--drivers/media/dvb/dvb-usb/dib0700_core.c8
-rw-r--r--drivers/media/dvb/dvb-usb/dib0700_devices.c14
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-common.c2
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb.h2
-rw-r--r--drivers/media/dvb/dvb-usb/digitv.c4
-rw-r--r--drivers/media/dvb/dvb-usb/dtt200u.c2
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-remote.c32
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb.h28
-rw-r--r--drivers/media/dvb/dvb-usb/dw2102.c12
-rw-r--r--drivers/media/dvb/dvb-usb/m920x.c8
-rw-r--r--drivers/media/dvb/dvb-usb/nova-t-usb2.c4
-rw-r--r--drivers/media/dvb/dvb-usb/opera1.c6
-rw-r--r--drivers/media/dvb/dvb-usb/vp702x.c4
-rw-r--r--drivers/media/dvb/dvb-usb/vp7045.c4
23 files changed, 90 insertions, 100 deletions
diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a800.c
index b6cbb1dfc5f1..55803830f6b9 100644
--- a/drivers/media/dvb/dvb-usb/a800.c
+++ b/drivers/media/dvb/dvb-usb/a800.c
@@ -37,7 +37,7 @@ static int a800_identify_state(struct usb_device *udev, struct dvb_usb_device_pr
37 return 0; 37 return 0;
38} 38}
39 39
40static struct dvb_usb_rc_key ir_codes_a800_table[] = { 40static struct ir_scancode ir_codes_a800_table[] = {
41 { 0x0201, KEY_PROG1 }, /* SOURCE */ 41 { 0x0201, KEY_PROG1 }, /* SOURCE */
42 { 0x0200, KEY_POWER }, /* POWER */ 42 { 0x0200, KEY_POWER }, /* POWER */
43 { 0x0205, KEY_1 }, /* 1 */ 43 { 0x0205, KEY_1 }, /* 1 */
diff --git a/drivers/media/dvb/dvb-usb/af9005-remote.c b/drivers/media/dvb/dvb-usb/af9005-remote.c
index b41fa873b04d..696207fe37ec 100644
--- a/drivers/media/dvb/dvb-usb/af9005-remote.c
+++ b/drivers/media/dvb/dvb-usb/af9005-remote.c
@@ -33,7 +33,7 @@ MODULE_PARM_DESC(debug,
33 33
34#define deb_decode(args...) dprintk(dvb_usb_af9005_remote_debug,0x01,args) 34#define deb_decode(args...) dprintk(dvb_usb_af9005_remote_debug,0x01,args)
35 35
36struct dvb_usb_rc_key ir_codes_af9005_table[] = { 36struct ir_scancode ir_codes_af9005_table[] = {
37 37
38 {0x01b7, KEY_POWER}, 38 {0x01b7, KEY_POWER},
39 {0x01a7, KEY_VOLUMEUP}, 39 {0x01a7, KEY_VOLUMEUP},
@@ -133,7 +133,7 @@ int af9005_rc_decode(struct dvb_usb_device *d, u8 * data, int len, u32 * event,
133 for (i = 0; i < ir_codes_af9005_table_size; i++) { 133 for (i = 0; i < ir_codes_af9005_table_size; i++) {
134 if (rc5_custom(&ir_codes_af9005_table[i]) == cust 134 if (rc5_custom(&ir_codes_af9005_table[i]) == cust
135 && rc5_data(&ir_codes_af9005_table[i]) == dat) { 135 && rc5_data(&ir_codes_af9005_table[i]) == dat) {
136 *event = ir_codes_af9005_table[i].event; 136 *event = ir_codes_af9005_table[i].keycode;
137 *state = REMOTE_KEY_PRESSED; 137 *state = REMOTE_KEY_PRESSED;
138 deb_decode 138 deb_decode
139 ("key pressed, event %x\n", *event); 139 ("key pressed, event %x\n", *event);
diff --git a/drivers/media/dvb/dvb-usb/af9005.h b/drivers/media/dvb/dvb-usb/af9005.h
index 088e7083a39b..3c1fbd1c5d60 100644
--- a/drivers/media/dvb/dvb-usb/af9005.h
+++ b/drivers/media/dvb/dvb-usb/af9005.h
@@ -3490,7 +3490,7 @@ extern u8 regmask[8];
3490/* remote control decoder */ 3490/* remote control decoder */
3491extern int af9005_rc_decode(struct dvb_usb_device *d, u8 * data, int len, 3491extern int af9005_rc_decode(struct dvb_usb_device *d, u8 * data, int len,
3492 u32 * event, int *state); 3492 u32 * event, int *state);
3493extern struct dvb_usb_rc_key ir_codes_af9005_table[]; 3493extern struct ir_scancode ir_codes_af9005_table[];
3494extern int ir_codes_af9005_table_size; 3494extern int ir_codes_af9005_table_size;
3495 3495
3496#endif 3496#endif
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c
index 2fb24c3f4774..c63134cf2069 100644
--- a/drivers/media/dvb/dvb-usb/af9015.c
+++ b/drivers/media/dvb/dvb-usb/af9015.c
@@ -735,7 +735,7 @@ error:
735 735
736struct af9015_setup { 736struct af9015_setup {
737 unsigned int id; 737 unsigned int id;
738 struct dvb_usb_rc_key *rc_key_map; 738 struct ir_scancode *rc_key_map;
739 unsigned int rc_key_map_size; 739 unsigned int rc_key_map_size;
740 u8 *ir_table; 740 u8 *ir_table;
741 unsigned int ir_table_size; 741 unsigned int ir_table_size;
@@ -1063,7 +1063,7 @@ static int af9015_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
1063{ 1063{
1064 u8 buf[8]; 1064 u8 buf[8];
1065 struct req_t req = {GET_IR_CODE, 0, 0, 0, 0, sizeof(buf), buf}; 1065 struct req_t req = {GET_IR_CODE, 0, 0, 0, 0, sizeof(buf), buf};
1066 struct dvb_usb_rc_key *keymap = d->props.rc_key_map; 1066 struct ir_scancode *keymap = d->props.rc_key_map;
1067 int i, ret; 1067 int i, ret;
1068 1068
1069 memset(buf, 0, sizeof(buf)); 1069 memset(buf, 0, sizeof(buf));
@@ -1078,7 +1078,7 @@ static int af9015_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
1078 for (i = 0; i < d->props.rc_key_map_size; i++) { 1078 for (i = 0; i < d->props.rc_key_map_size; i++) {
1079 if (!buf[1] && rc5_custom(&keymap[i]) == buf[0] && 1079 if (!buf[1] && rc5_custom(&keymap[i]) == buf[0] &&
1080 rc5_data(&keymap[i]) == buf[2]) { 1080 rc5_data(&keymap[i]) == buf[2]) {
1081 *event = keymap[i].event; 1081 *event = keymap[i].keycode;
1082 *state = REMOTE_KEY_PRESSED; 1082 *state = REMOTE_KEY_PRESSED;
1083 break; 1083 break;
1084 } 1084 }
diff --git a/drivers/media/dvb/dvb-usb/af9015.h b/drivers/media/dvb/dvb-usb/af9015.h
index 63b2a4907b7e..c8e9349742ee 100644
--- a/drivers/media/dvb/dvb-usb/af9015.h
+++ b/drivers/media/dvb/dvb-usb/af9015.h
@@ -123,7 +123,7 @@ enum af9015_remote {
123 123
124/* LeadTek - Y04G0051 */ 124/* LeadTek - Y04G0051 */
125/* Leadtek WinFast DTV Dongle Gold */ 125/* Leadtek WinFast DTV Dongle Gold */
126static struct dvb_usb_rc_key ir_codes_af9015_table_leadtek[] = { 126static struct ir_scancode ir_codes_af9015_table_leadtek[] = {
127 { 0x001e, KEY_1 }, 127 { 0x001e, KEY_1 },
128 { 0x001f, KEY_2 }, 128 { 0x001f, KEY_2 },
129 { 0x0020, KEY_3 }, 129 { 0x0020, KEY_3 },
@@ -227,7 +227,7 @@ static u8 af9015_ir_table_leadtek[] = {
227}; 227};
228 228
229/* TwinHan AzureWave AD-TU700(704J) */ 229/* TwinHan AzureWave AD-TU700(704J) */
230static struct dvb_usb_rc_key ir_codes_af9015_table_twinhan[] = { 230static struct ir_scancode ir_codes_af9015_table_twinhan[] = {
231 { 0x053f, KEY_POWER }, 231 { 0x053f, KEY_POWER },
232 { 0x0019, KEY_FAVORITES }, /* Favorite List */ 232 { 0x0019, KEY_FAVORITES }, /* Favorite List */
233 { 0x0004, KEY_TEXT }, /* Teletext */ 233 { 0x0004, KEY_TEXT }, /* Teletext */
@@ -338,7 +338,7 @@ static u8 af9015_ir_table_twinhan[] = {
338}; 338};
339 339
340/* A-Link DTU(m) */ 340/* A-Link DTU(m) */
341static struct dvb_usb_rc_key ir_codes_af9015_table_a_link[] = { 341static struct ir_scancode ir_codes_af9015_table_a_link[] = {
342 { 0x001e, KEY_1 }, 342 { 0x001e, KEY_1 },
343 { 0x001f, KEY_2 }, 343 { 0x001f, KEY_2 },
344 { 0x0020, KEY_3 }, 344 { 0x0020, KEY_3 },
@@ -381,7 +381,7 @@ static u8 af9015_ir_table_a_link[] = {
381}; 381};
382 382
383/* MSI DIGIVOX mini II V3.0 */ 383/* MSI DIGIVOX mini II V3.0 */
384static struct dvb_usb_rc_key ir_codes_af9015_table_msi[] = { 384static struct ir_scancode ir_codes_af9015_table_msi[] = {
385 { 0x001e, KEY_1 }, 385 { 0x001e, KEY_1 },
386 { 0x001f, KEY_2 }, 386 { 0x001f, KEY_2 },
387 { 0x0020, KEY_3 }, 387 { 0x0020, KEY_3 },
@@ -424,7 +424,7 @@ static u8 af9015_ir_table_msi[] = {
424}; 424};
425 425
426/* MYGICTV U718 */ 426/* MYGICTV U718 */
427static struct dvb_usb_rc_key ir_codes_af9015_table_mygictv[] = { 427static struct ir_scancode ir_codes_af9015_table_mygictv[] = {
428 { 0x003d, KEY_SWITCHVIDEOMODE }, 428 { 0x003d, KEY_SWITCHVIDEOMODE },
429 /* TV / AV */ 429 /* TV / AV */
430 { 0x0545, KEY_POWER }, 430 { 0x0545, KEY_POWER },
@@ -550,7 +550,7 @@ static u8 af9015_ir_table_kworld[] = {
550}; 550};
551 551
552/* AverMedia Volar X */ 552/* AverMedia Volar X */
553static struct dvb_usb_rc_key ir_codes_af9015_table_avermedia[] = { 553static struct ir_scancode ir_codes_af9015_table_avermedia[] = {
554 { 0x053d, KEY_PROG1 }, /* SOURCE */ 554 { 0x053d, KEY_PROG1 }, /* SOURCE */
555 { 0x0512, KEY_POWER }, /* POWER */ 555 { 0x0512, KEY_POWER }, /* POWER */
556 { 0x051e, KEY_1 }, /* 1 */ 556 { 0x051e, KEY_1 }, /* 1 */
@@ -656,7 +656,7 @@ static u8 af9015_ir_table_avermedia_ks[] = {
656}; 656};
657 657
658/* Digittrade DVB-T USB Stick */ 658/* Digittrade DVB-T USB Stick */
659static struct dvb_usb_rc_key ir_codes_af9015_table_digittrade[] = { 659static struct ir_scancode ir_codes_af9015_table_digittrade[] = {
660 { 0x010f, KEY_LAST }, /* RETURN */ 660 { 0x010f, KEY_LAST }, /* RETURN */
661 { 0x0517, KEY_TEXT }, /* TELETEXT */ 661 { 0x0517, KEY_TEXT }, /* TELETEXT */
662 { 0x0108, KEY_EPG }, /* EPG */ 662 { 0x0108, KEY_EPG }, /* EPG */
@@ -719,7 +719,7 @@ static u8 af9015_ir_table_digittrade[] = {
719}; 719};
720 720
721/* TREKSTOR DVB-T USB Stick */ 721/* TREKSTOR DVB-T USB Stick */
722static struct dvb_usb_rc_key ir_codes_af9015_table_trekstor[] = { 722static struct ir_scancode ir_codes_af9015_table_trekstor[] = {
723 { 0x0704, KEY_AGAIN }, /* Home */ 723 { 0x0704, KEY_AGAIN }, /* Home */
724 { 0x0705, KEY_MUTE }, /* Mute */ 724 { 0x0705, KEY_MUTE }, /* Mute */
725 { 0x0706, KEY_UP }, /* Up */ 725 { 0x0706, KEY_UP }, /* Up */
@@ -782,7 +782,7 @@ static u8 af9015_ir_table_trekstor[] = {
782}; 782};
783 783
784/* MSI DIGIVOX mini III */ 784/* MSI DIGIVOX mini III */
785static struct dvb_usb_rc_key ir_codes_af9015_table_msi_digivox_iii[] = { 785static struct ir_scancode ir_codes_af9015_table_msi_digivox_iii[] = {
786 { 0x0713, KEY_POWER }, /* [red power button] */ 786 { 0x0713, KEY_POWER }, /* [red power button] */
787 { 0x073b, KEY_VIDEO }, /* Source */ 787 { 0x073b, KEY_VIDEO }, /* Source */
788 { 0x073e, KEY_ZOOM }, /* Zoom */ 788 { 0x073e, KEY_ZOOM }, /* Zoom */
diff --git a/drivers/media/dvb/dvb-usb/anysee.c b/drivers/media/dvb/dvb-usb/anysee.c
index aa5c7d5eef69..3e39e8ff7e8f 100644
--- a/drivers/media/dvb/dvb-usb/anysee.c
+++ b/drivers/media/dvb/dvb-usb/anysee.c
@@ -377,7 +377,7 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap)
377static int anysee_rc_query(struct dvb_usb_device *d, u32 *event, int *state) 377static int anysee_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
378{ 378{
379 u8 buf[] = {CMD_GET_IR_CODE}; 379 u8 buf[] = {CMD_GET_IR_CODE};
380 struct dvb_usb_rc_key *keymap = d->props.rc_key_map; 380 struct ir_scancode *keymap = d->props.rc_key_map;
381 u8 ircode[2]; 381 u8 ircode[2];
382 int i, ret; 382 int i, ret;
383 383
@@ -391,7 +391,7 @@ static int anysee_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
391 for (i = 0; i < d->props.rc_key_map_size; i++) { 391 for (i = 0; i < d->props.rc_key_map_size; i++) {
392 if (rc5_custom(&keymap[i]) == ircode[0] && 392 if (rc5_custom(&keymap[i]) == ircode[0] &&
393 rc5_data(&keymap[i]) == ircode[1]) { 393 rc5_data(&keymap[i]) == ircode[1]) {
394 *event = keymap[i].event; 394 *event = keymap[i].keycode;
395 *state = REMOTE_KEY_PRESSED; 395 *state = REMOTE_KEY_PRESSED;
396 return 0; 396 return 0;
397 } 397 }
@@ -399,7 +399,7 @@ static int anysee_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
399 return 0; 399 return 0;
400} 400}
401 401
402static struct dvb_usb_rc_key ir_codes_anysee_table[] = { 402static struct ir_scancode ir_codes_anysee_table[] = {
403 { 0x0100, KEY_0 }, 403 { 0x0100, KEY_0 },
404 { 0x0101, KEY_1 }, 404 { 0x0101, KEY_1 },
405 { 0x0102, KEY_2 }, 405 { 0x0102, KEY_2 },
diff --git a/drivers/media/dvb/dvb-usb/az6027.c b/drivers/media/dvb/dvb-usb/az6027.c
index 6681ac1c56e3..03d9bfeb233e 100644
--- a/drivers/media/dvb/dvb-usb/az6027.c
+++ b/drivers/media/dvb/dvb-usb/az6027.c
@@ -386,7 +386,7 @@ static int az6027_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
386} 386}
387 387
388/* keys for the enclosed remote control */ 388/* keys for the enclosed remote control */
389static struct dvb_usb_rc_key ir_codes_az6027_table[] = { 389static struct ir_scancode ir_codes_az6027_table[] = {
390 { 0x01, KEY_1 }, 390 { 0x01, KEY_1 },
391 { 0x02, KEY_2 }, 391 { 0x02, KEY_2 },
392}; 392};
diff --git a/drivers/media/dvb/dvb-usb/cinergyT2-core.c b/drivers/media/dvb/dvb-usb/cinergyT2-core.c
index 5a9c14bdc980..806d781a9722 100644
--- a/drivers/media/dvb/dvb-usb/cinergyT2-core.c
+++ b/drivers/media/dvb/dvb-usb/cinergyT2-core.c
@@ -84,7 +84,7 @@ static int cinergyt2_frontend_attach(struct dvb_usb_adapter *adap)
84 return 0; 84 return 0;
85} 85}
86 86
87static struct dvb_usb_rc_key ir_codes_cinergyt2_table[] = { 87static struct ir_scancode ir_codes_cinergyt2_table[] = {
88 { 0x0401, KEY_POWER }, 88 { 0x0401, KEY_POWER },
89 { 0x0402, KEY_1 }, 89 { 0x0402, KEY_1 },
90 { 0x0403, KEY_2 }, 90 { 0x0403, KEY_2 },
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
index 11e9e85dac86..22fc0a99f5ad 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -385,7 +385,7 @@ static int cxusb_d680_dmb_streaming_ctrl(
385 385
386static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) 386static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
387{ 387{
388 struct dvb_usb_rc_key *keymap = d->props.rc_key_map; 388 struct ir_scancode *keymap = d->props.rc_key_map;
389 u8 ircode[4]; 389 u8 ircode[4];
390 int i; 390 int i;
391 391
@@ -397,7 +397,7 @@ static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
397 for (i = 0; i < d->props.rc_key_map_size; i++) { 397 for (i = 0; i < d->props.rc_key_map_size; i++) {
398 if (rc5_custom(&keymap[i]) == ircode[2] && 398 if (rc5_custom(&keymap[i]) == ircode[2] &&
399 rc5_data(&keymap[i]) == ircode[3]) { 399 rc5_data(&keymap[i]) == ircode[3]) {
400 *event = keymap[i].event; 400 *event = keymap[i].keycode;
401 *state = REMOTE_KEY_PRESSED; 401 *state = REMOTE_KEY_PRESSED;
402 402
403 return 0; 403 return 0;
@@ -410,7 +410,7 @@ static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
410static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event, 410static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event,
411 int *state) 411 int *state)
412{ 412{
413 struct dvb_usb_rc_key *keymap = d->props.rc_key_map; 413 struct ir_scancode *keymap = d->props.rc_key_map;
414 u8 ircode[4]; 414 u8 ircode[4];
415 int i; 415 int i;
416 struct i2c_msg msg = { .addr = 0x6b, .flags = I2C_M_RD, 416 struct i2c_msg msg = { .addr = 0x6b, .flags = I2C_M_RD,
@@ -425,7 +425,7 @@ static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event,
425 for (i = 0; i < d->props.rc_key_map_size; i++) { 425 for (i = 0; i < d->props.rc_key_map_size; i++) {
426 if (rc5_custom(&keymap[i]) == ircode[1] && 426 if (rc5_custom(&keymap[i]) == ircode[1] &&
427 rc5_data(&keymap[i]) == ircode[2]) { 427 rc5_data(&keymap[i]) == ircode[2]) {
428 *event = keymap[i].event; 428 *event = keymap[i].keycode;
429 *state = REMOTE_KEY_PRESSED; 429 *state = REMOTE_KEY_PRESSED;
430 430
431 return 0; 431 return 0;
@@ -438,7 +438,7 @@ static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event,
438static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event, 438static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event,
439 int *state) 439 int *state)
440{ 440{
441 struct dvb_usb_rc_key *keymap = d->props.rc_key_map; 441 struct ir_scancode *keymap = d->props.rc_key_map;
442 u8 ircode[2]; 442 u8 ircode[2];
443 int i; 443 int i;
444 444
@@ -451,7 +451,7 @@ static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event,
451 for (i = 0; i < d->props.rc_key_map_size; i++) { 451 for (i = 0; i < d->props.rc_key_map_size; i++) {
452 if (rc5_custom(&keymap[i]) == ircode[0] && 452 if (rc5_custom(&keymap[i]) == ircode[0] &&
453 rc5_data(&keymap[i]) == ircode[1]) { 453 rc5_data(&keymap[i]) == ircode[1]) {
454 *event = keymap[i].event; 454 *event = keymap[i].keycode;
455 *state = REMOTE_KEY_PRESSED; 455 *state = REMOTE_KEY_PRESSED;
456 456
457 return 0; 457 return 0;
@@ -461,7 +461,7 @@ static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event,
461 return 0; 461 return 0;
462} 462}
463 463
464static struct dvb_usb_rc_key ir_codes_dvico_mce_table[] = { 464static struct ir_scancode ir_codes_dvico_mce_table[] = {
465 { 0xfe02, KEY_TV }, 465 { 0xfe02, KEY_TV },
466 { 0xfe0e, KEY_MP3 }, 466 { 0xfe0e, KEY_MP3 },
467 { 0xfe1a, KEY_DVD }, 467 { 0xfe1a, KEY_DVD },
@@ -509,7 +509,7 @@ static struct dvb_usb_rc_key ir_codes_dvico_mce_table[] = {
509 { 0xfe4e, KEY_POWER }, 509 { 0xfe4e, KEY_POWER },
510}; 510};
511 511
512static struct dvb_usb_rc_key ir_codes_dvico_portable_table[] = { 512static struct ir_scancode ir_codes_dvico_portable_table[] = {
513 { 0xfc02, KEY_SETUP }, /* Profile */ 513 { 0xfc02, KEY_SETUP }, /* Profile */
514 { 0xfc43, KEY_POWER2 }, 514 { 0xfc43, KEY_POWER2 },
515 { 0xfc06, KEY_EPG }, 515 { 0xfc06, KEY_EPG },
@@ -548,7 +548,7 @@ static struct dvb_usb_rc_key ir_codes_dvico_portable_table[] = {
548 { 0xfc00, KEY_UNKNOWN }, /* HD */ 548 { 0xfc00, KEY_UNKNOWN }, /* HD */
549}; 549};
550 550
551static struct dvb_usb_rc_key ir_codes_d680_dmb_table[] = { 551static struct ir_scancode ir_codes_d680_dmb_table[] = {
552 { 0x0038, KEY_UNKNOWN }, /* TV/AV */ 552 { 0x0038, KEY_UNKNOWN }, /* TV/AV */
553 { 0x080c, KEY_ZOOM }, 553 { 0x080c, KEY_ZOOM },
554 { 0x0800, KEY_0 }, 554 { 0x0800, KEY_0 },
diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c
index 7deade7d1d23..f761897eef3c 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_core.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_core.c
@@ -491,7 +491,7 @@ struct dib0700_rc_response {
491static void dib0700_rc_urb_completion(struct urb *purb) 491static void dib0700_rc_urb_completion(struct urb *purb)
492{ 492{
493 struct dvb_usb_device *d = purb->context; 493 struct dvb_usb_device *d = purb->context;
494 struct dvb_usb_rc_key *keymap; 494 struct ir_scancode *keymap;
495 struct dib0700_state *st; 495 struct dib0700_state *st;
496 struct dib0700_rc_response poll_reply; 496 struct dib0700_rc_response poll_reply;
497 u8 *buf; 497 u8 *buf;
@@ -574,7 +574,7 @@ static void dib0700_rc_urb_completion(struct urb *purb)
574 for (i = 0; i < d->props.rc_key_map_size; i++) { 574 for (i = 0; i < d->props.rc_key_map_size; i++) {
575 if (rc5_custom(&keymap[i]) == (poll_reply.system & 0xff) && 575 if (rc5_custom(&keymap[i]) == (poll_reply.system & 0xff) &&
576 rc5_data(&keymap[i]) == poll_reply.data) { 576 rc5_data(&keymap[i]) == poll_reply.data) {
577 event = keymap[i].event; 577 event = keymap[i].keycode;
578 found = 1; 578 found = 1;
579 break; 579 break;
580 } 580 }
@@ -590,9 +590,9 @@ static void dib0700_rc_urb_completion(struct urb *purb)
590 if (poll_reply.data_state == 1) { 590 if (poll_reply.data_state == 1) {
591 /* New key hit */ 591 /* New key hit */
592 st->rc_counter = 0; 592 st->rc_counter = 0;
593 event = keymap[i].event; 593 event = keymap[i].keycode;
594 state = REMOTE_KEY_PRESSED; 594 state = REMOTE_KEY_PRESSED;
595 d->last_event = keymap[i].event; 595 d->last_event = keymap[i].keycode;
596 } else if (poll_reply.data_state == 2) { 596 } else if (poll_reply.data_state == 2) {
597 /* Key repeated */ 597 /* Key repeated */
598 st->rc_counter++; 598 st->rc_counter++;
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index 800800a9649e..0c9adbbcedb2 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -477,7 +477,7 @@ static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
477{ 477{
478 u8 key[4]; 478 u8 key[4];
479 int i; 479 int i;
480 struct dvb_usb_rc_key *keymap = d->props.rc_key_map; 480 struct ir_scancode *keymap = d->props.rc_key_map;
481 struct dib0700_state *st = d->priv; 481 struct dib0700_state *st = d->priv;
482 482
483 *event = 0; 483 *event = 0;
@@ -521,9 +521,9 @@ static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
521 if (rc5_custom(&keymap[i]) == key[3-2] && 521 if (rc5_custom(&keymap[i]) == key[3-2] &&
522 rc5_data(&keymap[i]) == key[3-3]) { 522 rc5_data(&keymap[i]) == key[3-3]) {
523 st->rc_counter = 0; 523 st->rc_counter = 0;
524 *event = keymap[i].event; 524 *event = keymap[i].keycode;
525 *state = REMOTE_KEY_PRESSED; 525 *state = REMOTE_KEY_PRESSED;
526 d->last_event = keymap[i].event; 526 d->last_event = keymap[i].keycode;
527 return 0; 527 return 0;
528 } 528 }
529 } 529 }
@@ -534,7 +534,7 @@ static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
534 for (i = 0; i < d->props.rc_key_map_size; i++) { 534 for (i = 0; i < d->props.rc_key_map_size; i++) {
535 if (rc5_custom(&keymap[i]) == key[3-2] && 535 if (rc5_custom(&keymap[i]) == key[3-2] &&
536 rc5_data(&keymap[i]) == key[3-3]) { 536 rc5_data(&keymap[i]) == key[3-3]) {
537 if (d->last_event == keymap[i].event && 537 if (d->last_event == keymap[i].keycode &&
538 key[3-1] == st->rc_toggle) { 538 key[3-1] == st->rc_toggle) {
539 st->rc_counter++; 539 st->rc_counter++;
540 /* prevents unwanted double hits */ 540 /* prevents unwanted double hits */
@@ -547,10 +547,10 @@ static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
547 return 0; 547 return 0;
548 } 548 }
549 st->rc_counter = 0; 549 st->rc_counter = 0;
550 *event = keymap[i].event; 550 *event = keymap[i].keycode;
551 *state = REMOTE_KEY_PRESSED; 551 *state = REMOTE_KEY_PRESSED;
552 st->rc_toggle = key[3-1]; 552 st->rc_toggle = key[3-1];
553 d->last_event = keymap[i].event; 553 d->last_event = keymap[i].keycode;
554 return 0; 554 return 0;
555 } 555 }
556 } 556 }
@@ -562,7 +562,7 @@ static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
562 return 0; 562 return 0;
563} 563}
564 564
565static struct dvb_usb_rc_key ir_codes_dib0700_table[] = { 565static struct ir_scancode ir_codes_dib0700_table[] = {
566 /* Key codes for the tiny Pinnacle remote*/ 566 /* Key codes for the tiny Pinnacle remote*/
567 { 0x0700, KEY_MUTE }, 567 { 0x0700, KEY_MUTE },
568 { 0x0701, KEY_MENU }, /* Pinnacle logo */ 568 { 0x0701, KEY_MENU }, /* Pinnacle logo */
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c
index bc08bc0b723c..ba991aa21aff 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-common.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-common.c
@@ -327,7 +327,7 @@ EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach);
327/* 327/*
328 * common remote control stuff 328 * common remote control stuff
329 */ 329 */
330struct dvb_usb_rc_key ir_codes_dibusb_table[] = { 330struct ir_scancode ir_codes_dibusb_table[] = {
331 /* Key codes for the little Artec T1/Twinhan/HAMA/ remote. */ 331 /* Key codes for the little Artec T1/Twinhan/HAMA/ remote. */
332 { 0x0016, KEY_POWER }, 332 { 0x0016, KEY_POWER },
333 { 0x0010, KEY_MUTE }, 333 { 0x0010, KEY_MUTE },
diff --git a/drivers/media/dvb/dvb-usb/dibusb.h b/drivers/media/dvb/dvb-usb/dibusb.h
index 3d50ac59088f..61a6bf389472 100644
--- a/drivers/media/dvb/dvb-usb/dibusb.h
+++ b/drivers/media/dvb/dvb-usb/dibusb.h
@@ -124,7 +124,7 @@ extern int dibusb2_0_power_ctrl(struct dvb_usb_device *, int);
124#define DEFAULT_RC_INTERVAL 150 124#define DEFAULT_RC_INTERVAL 150
125//#define DEFAULT_RC_INTERVAL 100000 125//#define DEFAULT_RC_INTERVAL 100000
126 126
127extern struct dvb_usb_rc_key ir_codes_dibusb_table[]; 127extern struct ir_scancode ir_codes_dibusb_table[];
128extern int dibusb_rc_query(struct dvb_usb_device *, u32 *, int *); 128extern int dibusb_rc_query(struct dvb_usb_device *, u32 *, int *);
129extern int dibusb_read_eeprom_byte(struct dvb_usb_device *, u8, u8 *); 129extern int dibusb_read_eeprom_byte(struct dvb_usb_device *, u8, u8 *);
130 130
diff --git a/drivers/media/dvb/dvb-usb/digitv.c b/drivers/media/dvb/dvb-usb/digitv.c
index e826077094fa..73f14a24ffab 100644
--- a/drivers/media/dvb/dvb-usb/digitv.c
+++ b/drivers/media/dvb/dvb-usb/digitv.c
@@ -161,7 +161,7 @@ static int digitv_tuner_attach(struct dvb_usb_adapter *adap)
161 return 0; 161 return 0;
162} 162}
163 163
164static struct dvb_usb_rc_key ir_codes_digitv_table[] = { 164static struct ir_scancode ir_codes_digitv_table[] = {
165 { 0x5f55, KEY_0 }, 165 { 0x5f55, KEY_0 },
166 { 0x6f55, KEY_1 }, 166 { 0x6f55, KEY_1 },
167 { 0x9f55, KEY_2 }, 167 { 0x9f55, KEY_2 },
@@ -240,7 +240,7 @@ static int digitv_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
240 for (i = 0; i < d->props.rc_key_map_size; i++) { 240 for (i = 0; i < d->props.rc_key_map_size; i++) {
241 if (rc5_custom(&d->props.rc_key_map[i]) == key[1] && 241 if (rc5_custom(&d->props.rc_key_map[i]) == key[1] &&
242 rc5_data(&d->props.rc_key_map[i]) == key[2]) { 242 rc5_data(&d->props.rc_key_map[i]) == key[2]) {
243 *event = d->props.rc_key_map[i].event; 243 *event = d->props.rc_key_map[i].keycode;
244 *state = REMOTE_KEY_PRESSED; 244 *state = REMOTE_KEY_PRESSED;
245 return 0; 245 return 0;
246 } 246 }
diff --git a/drivers/media/dvb/dvb-usb/dtt200u.c b/drivers/media/dvb/dvb-usb/dtt200u.c
index f57e59044d4d..c0de0c06ffab 100644
--- a/drivers/media/dvb/dvb-usb/dtt200u.c
+++ b/drivers/media/dvb/dvb-usb/dtt200u.c
@@ -57,7 +57,7 @@ static int dtt200u_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid,
57 57
58/* remote control */ 58/* remote control */
59/* key list for the tiny remote control (Yakumo, don't know about the others) */ 59/* key list for the tiny remote control (Yakumo, don't know about the others) */
60static struct dvb_usb_rc_key ir_codes_dtt200u_table[] = { 60static struct ir_scancode ir_codes_dtt200u_table[] = {
61 { 0x8001, KEY_MUTE }, 61 { 0x8001, KEY_MUTE },
62 { 0x8002, KEY_CHANNELDOWN }, 62 { 0x8002, KEY_CHANNELDOWN },
63 { 0x8003, KEY_VOLUMEDOWN }, 63 { 0x8003, KEY_VOLUMEDOWN },
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
index 852fe89539cf..e210f2f14d86 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
@@ -13,13 +13,13 @@ static int dvb_usb_getkeycode(struct input_dev *dev,
13{ 13{
14 struct dvb_usb_device *d = input_get_drvdata(dev); 14 struct dvb_usb_device *d = input_get_drvdata(dev);
15 15
16 struct dvb_usb_rc_key *keymap = d->props.rc_key_map; 16 struct ir_scancode *keymap = d->props.rc_key_map;
17 int i; 17 int i;
18 18
19 /* See if we can match the raw key code. */ 19 /* See if we can match the raw key code. */
20 for (i = 0; i < d->props.rc_key_map_size; i++) 20 for (i = 0; i < d->props.rc_key_map_size; i++)
21 if (keymap[i].scan == scancode) { 21 if (keymap[i].scancode == scancode) {
22 *keycode = keymap[i].event; 22 *keycode = keymap[i].keycode;
23 return 0; 23 return 0;
24 } 24 }
25 25
@@ -29,8 +29,8 @@ static int dvb_usb_getkeycode(struct input_dev *dev,
29 * to work 29 * to work
30 */ 30 */
31 for (i = 0; i < d->props.rc_key_map_size; i++) 31 for (i = 0; i < d->props.rc_key_map_size; i++)
32 if (keymap[i].event == KEY_RESERVED || 32 if (keymap[i].keycode == KEY_RESERVED ||
33 keymap[i].event == KEY_UNKNOWN) { 33 keymap[i].keycode == KEY_UNKNOWN) {
34 *keycode = KEY_RESERVED; 34 *keycode = KEY_RESERVED;
35 return 0; 35 return 0;
36 } 36 }
@@ -43,22 +43,22 @@ static int dvb_usb_setkeycode(struct input_dev *dev,
43{ 43{
44 struct dvb_usb_device *d = input_get_drvdata(dev); 44 struct dvb_usb_device *d = input_get_drvdata(dev);
45 45
46 struct dvb_usb_rc_key *keymap = d->props.rc_key_map; 46 struct ir_scancode *keymap = d->props.rc_key_map;
47 int i; 47 int i;
48 48
49 /* Search if it is replacing an existing keycode */ 49 /* Search if it is replacing an existing keycode */
50 for (i = 0; i < d->props.rc_key_map_size; i++) 50 for (i = 0; i < d->props.rc_key_map_size; i++)
51 if (keymap[i].scan == scancode) { 51 if (keymap[i].scancode == scancode) {
52 keymap[i].event = keycode; 52 keymap[i].keycode = keycode;
53 return 0; 53 return 0;
54 } 54 }
55 55
56 /* Search if is there a clean entry. If so, use it */ 56 /* Search if is there a clean entry. If so, use it */
57 for (i = 0; i < d->props.rc_key_map_size; i++) 57 for (i = 0; i < d->props.rc_key_map_size; i++)
58 if (keymap[i].event == KEY_RESERVED || 58 if (keymap[i].keycode == KEY_RESERVED ||
59 keymap[i].event == KEY_UNKNOWN) { 59 keymap[i].keycode == KEY_UNKNOWN) {
60 keymap[i].scan = scancode; 60 keymap[i].scancode = scancode;
61 keymap[i].event = keycode; 61 keymap[i].keycode = keycode;
62 return 0; 62 return 0;
63 } 63 }
64 64
@@ -184,8 +184,8 @@ int dvb_usb_remote_init(struct dvb_usb_device *d)
184 deb_rc("key map size: %d\n", d->props.rc_key_map_size); 184 deb_rc("key map size: %d\n", d->props.rc_key_map_size);
185 for (i = 0; i < d->props.rc_key_map_size; i++) { 185 for (i = 0; i < d->props.rc_key_map_size; i++) {
186 deb_rc("setting bit for event %d item %d\n", 186 deb_rc("setting bit for event %d item %d\n",
187 d->props.rc_key_map[i].event, i); 187 d->props.rc_key_map[i].keycode, i);
188 set_bit(d->props.rc_key_map[i].event, input_dev->keybit); 188 set_bit(d->props.rc_key_map[i].keycode, input_dev->keybit);
189 } 189 }
190 190
191 /* Start the remote-control polling. */ 191 /* Start the remote-control polling. */
@@ -234,7 +234,7 @@ int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d,
234 u8 keybuf[5], u32 *event, int *state) 234 u8 keybuf[5], u32 *event, int *state)
235{ 235{
236 int i; 236 int i;
237 struct dvb_usb_rc_key *keymap = d->props.rc_key_map; 237 struct ir_scancode *keymap = d->props.rc_key_map;
238 *event = 0; 238 *event = 0;
239 *state = REMOTE_NO_KEY_PRESSED; 239 *state = REMOTE_NO_KEY_PRESSED;
240 switch (keybuf[0]) { 240 switch (keybuf[0]) {
@@ -250,7 +250,7 @@ int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d,
250 for (i = 0; i < d->props.rc_key_map_size; i++) 250 for (i = 0; i < d->props.rc_key_map_size; i++)
251 if (rc5_custom(&keymap[i]) == keybuf[1] && 251 if (rc5_custom(&keymap[i]) == keybuf[1] &&
252 rc5_data(&keymap[i]) == keybuf[3]) { 252 rc5_data(&keymap[i]) == keybuf[3]) {
253 *event = keymap[i].event; 253 *event = keymap[i].keycode;
254 *state = REMOTE_KEY_PRESSED; 254 *state = REMOTE_KEY_PRESSED;
255 return 0; 255 return 0;
256 } 256 }
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h
index 4a9f676087bf..832bbfd55f5b 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb.h
@@ -14,6 +14,7 @@
14#include <linux/usb.h> 14#include <linux/usb.h>
15#include <linux/firmware.h> 15#include <linux/firmware.h>
16#include <linux/mutex.h> 16#include <linux/mutex.h>
17#include <media/rc-map.h>
17 18
18#include "dvb_frontend.h" 19#include "dvb_frontend.h"
19#include "dvb_demux.h" 20#include "dvb_demux.h"
@@ -74,30 +75,19 @@ struct dvb_usb_device_description {
74 struct usb_device_id *warm_ids[DVB_USB_ID_MAX_NUM]; 75 struct usb_device_id *warm_ids[DVB_USB_ID_MAX_NUM];
75}; 76};
76 77
77/** 78static inline u8 rc5_custom(struct ir_scancode *key)
78 * struct dvb_usb_rc_key - a remote control key and its input-event
79 * @custom: the vendor/custom part of the key
80 * @data: the actual key part
81 * @event: the input event assigned to key identified by custom and data
82 */
83struct dvb_usb_rc_key {
84 u16 scan;
85 u32 event;
86};
87
88static inline u8 rc5_custom(struct dvb_usb_rc_key *key)
89{ 79{
90 return (key->scan >> 8) & 0xff; 80 return (key->scancode >> 8) & 0xff;
91} 81}
92 82
93static inline u8 rc5_data(struct dvb_usb_rc_key *key) 83static inline u8 rc5_data(struct ir_scancode *key)
94{ 84{
95 return key->scan & 0xff; 85 return key->scancode & 0xff;
96} 86}
97 87
98static inline u8 rc5_scan(struct dvb_usb_rc_key *key) 88static inline u8 rc5_scan(struct ir_scancode *key)
99{ 89{
100 return key->scan & 0xffff; 90 return key->scancode & 0xffff;
101} 91}
102 92
103struct dvb_usb_device; 93struct dvb_usb_device;
@@ -185,7 +175,7 @@ struct dvb_usb_adapter_properties {
185 * @identify_state: called to determine the state (cold or warm), when it 175 * @identify_state: called to determine the state (cold or warm), when it
186 * is not distinguishable by the USB IDs. 176 * is not distinguishable by the USB IDs.
187 * 177 *
188 * @rc_key_map: a hard-wired array of struct dvb_usb_rc_key (NULL to disable 178 * @rc_key_map: a hard-wired array of struct ir_scancode (NULL to disable
189 * remote control handling). 179 * remote control handling).
190 * @rc_key_map_size: number of items in @rc_key_map. 180 * @rc_key_map_size: number of items in @rc_key_map.
191 * @rc_query: called to query an event event. 181 * @rc_query: called to query an event event.
@@ -237,7 +227,7 @@ struct dvb_usb_device_properties {
237#define REMOTE_NO_KEY_PRESSED 0x00 227#define REMOTE_NO_KEY_PRESSED 0x00
238#define REMOTE_KEY_PRESSED 0x01 228#define REMOTE_KEY_PRESSED 0x01
239#define REMOTE_KEY_REPEAT 0x02 229#define REMOTE_KEY_REPEAT 0x02
240 struct dvb_usb_rc_key *rc_key_map; 230 struct ir_scancode *rc_key_map;
241 int rc_key_map_size; 231 int rc_key_map_size;
242 int (*rc_query) (struct dvb_usb_device *, u32 *, int *); 232 int (*rc_query) (struct dvb_usb_device *, u32 *, int *);
243 int rc_interval; 233 int rc_interval;
diff --git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c
index e8fb85380672..2528e06ec31f 100644
--- a/drivers/media/dvb/dvb-usb/dw2102.c
+++ b/drivers/media/dvb/dvb-usb/dw2102.c
@@ -74,7 +74,7 @@
74 "on firmware-problems." 74 "on firmware-problems."
75 75
76struct ir_codes_dvb_usb_table_table { 76struct ir_codes_dvb_usb_table_table {
77 struct dvb_usb_rc_key *rc_keys; 77 struct ir_scancode *rc_keys;
78 int rc_keys_size; 78 int rc_keys_size;
79}; 79};
80 80
@@ -948,7 +948,7 @@ static int dw3101_tuner_attach(struct dvb_usb_adapter *adap)
948 return 0; 948 return 0;
949} 949}
950 950
951static struct dvb_usb_rc_key ir_codes_dw210x_table[] = { 951static struct ir_scancode ir_codes_dw210x_table[] = {
952 { 0xf80a, KEY_Q }, /*power*/ 952 { 0xf80a, KEY_Q }, /*power*/
953 { 0xf80c, KEY_M }, /*mute*/ 953 { 0xf80c, KEY_M }, /*mute*/
954 { 0xf811, KEY_1 }, 954 { 0xf811, KEY_1 },
@@ -982,7 +982,7 @@ static struct dvb_usb_rc_key ir_codes_dw210x_table[] = {
982 { 0xf81b, KEY_B }, /*recall*/ 982 { 0xf81b, KEY_B }, /*recall*/
983}; 983};
984 984
985static struct dvb_usb_rc_key ir_codes_tevii_table[] = { 985static struct ir_scancode ir_codes_tevii_table[] = {
986 { 0xf80a, KEY_POWER }, 986 { 0xf80a, KEY_POWER },
987 { 0xf80c, KEY_MUTE }, 987 { 0xf80c, KEY_MUTE },
988 { 0xf811, KEY_1 }, 988 { 0xf811, KEY_1 },
@@ -1032,7 +1032,7 @@ static struct dvb_usb_rc_key ir_codes_tevii_table[] = {
1032 { 0xf858, KEY_SWITCHVIDEOMODE }, 1032 { 0xf858, KEY_SWITCHVIDEOMODE },
1033}; 1033};
1034 1034
1035static struct dvb_usb_rc_key ir_codes_tbs_table[] = { 1035static struct ir_scancode ir_codes_tbs_table[] = {
1036 { 0xf884, KEY_POWER }, 1036 { 0xf884, KEY_POWER },
1037 { 0xf894, KEY_MUTE }, 1037 { 0xf894, KEY_MUTE },
1038 { 0xf887, KEY_1 }, 1038 { 0xf887, KEY_1 },
@@ -1075,7 +1075,7 @@ static struct ir_codes_dvb_usb_table_table keys_tables[] = {
1075 1075
1076static int dw2102_rc_query(struct dvb_usb_device *d, u32 *event, int *state) 1076static int dw2102_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
1077{ 1077{
1078 struct dvb_usb_rc_key *keymap = d->props.rc_key_map; 1078 struct ir_scancode *keymap = d->props.rc_key_map;
1079 int keymap_size = d->props.rc_key_map_size; 1079 int keymap_size = d->props.rc_key_map_size;
1080 u8 key[2]; 1080 u8 key[2];
1081 struct i2c_msg msg = { 1081 struct i2c_msg msg = {
@@ -1096,7 +1096,7 @@ static int dw2102_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
1096 for (i = 0; i < keymap_size ; i++) { 1096 for (i = 0; i < keymap_size ; i++) {
1097 if (rc5_data(&keymap[i]) == msg.buf[0]) { 1097 if (rc5_data(&keymap[i]) == msg.buf[0]) {
1098 *state = REMOTE_KEY_PRESSED; 1098 *state = REMOTE_KEY_PRESSED;
1099 *event = keymap[i].event; 1099 *event = keymap[i].keycode;
1100 break; 1100 break;
1101 } 1101 }
1102 1102
diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c
index c211fef45fc3..1e1cb6b6d654 100644
--- a/drivers/media/dvb/dvb-usb/m920x.c
+++ b/drivers/media/dvb/dvb-usb/m920x.c
@@ -144,7 +144,7 @@ static int m920x_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
144 144
145 for (i = 0; i < d->props.rc_key_map_size; i++) 145 for (i = 0; i < d->props.rc_key_map_size; i++)
146 if (rc5_data(&d->props.rc_key_map[i]) == rc_state[1]) { 146 if (rc5_data(&d->props.rc_key_map[i]) == rc_state[1]) {
147 *event = d->props.rc_key_map[i].event; 147 *event = d->props.rc_key_map[i].keycode;
148 148
149 switch(rc_state[0]) { 149 switch(rc_state[0]) {
150 case 0x80: 150 case 0x80:
@@ -589,7 +589,7 @@ static struct m920x_inits pinnacle310e_init[] = {
589}; 589};
590 590
591/* ir keymaps */ 591/* ir keymaps */
592static struct dvb_usb_rc_key ir_codes_megasky_table [] = { 592static struct ir_scancode ir_codes_megasky_table[] = {
593 { 0x0012, KEY_POWER }, 593 { 0x0012, KEY_POWER },
594 { 0x001e, KEY_CYCLEWINDOWS }, /* min/max */ 594 { 0x001e, KEY_CYCLEWINDOWS }, /* min/max */
595 { 0x0002, KEY_CHANNELUP }, 595 { 0x0002, KEY_CHANNELUP },
@@ -608,7 +608,7 @@ static struct dvb_usb_rc_key ir_codes_megasky_table [] = {
608 { 0x000e, KEY_COFFEE }, /* "MTS" */ 608 { 0x000e, KEY_COFFEE }, /* "MTS" */
609}; 609};
610 610
611static struct dvb_usb_rc_key ir_codes_tvwalkertwin_table [] = { 611static struct ir_scancode ir_codes_tvwalkertwin_table[] = {
612 { 0x0001, KEY_ZOOM }, /* Full Screen */ 612 { 0x0001, KEY_ZOOM }, /* Full Screen */
613 { 0x0002, KEY_CAMERA }, /* snapshot */ 613 { 0x0002, KEY_CAMERA }, /* snapshot */
614 { 0x0003, KEY_MUTE }, 614 { 0x0003, KEY_MUTE },
@@ -628,7 +628,7 @@ static struct dvb_usb_rc_key ir_codes_tvwalkertwin_table [] = {
628 { 0x001e, KEY_VOLUMEUP }, 628 { 0x001e, KEY_VOLUMEUP },
629}; 629};
630 630
631static struct dvb_usb_rc_key ir_codes_pinnacle310e_table[] = { 631static struct ir_scancode ir_codes_pinnacle310e_table[] = {
632 { 0x16, KEY_POWER }, 632 { 0x16, KEY_POWER },
633 { 0x17, KEY_FAVORITES }, 633 { 0x17, KEY_FAVORITES },
634 { 0x0f, KEY_TEXT }, 634 { 0x0f, KEY_TEXT },
diff --git a/drivers/media/dvb/dvb-usb/nova-t-usb2.c b/drivers/media/dvb/dvb-usb/nova-t-usb2.c
index d195a587cc65..b48e217ef884 100644
--- a/drivers/media/dvb/dvb-usb/nova-t-usb2.c
+++ b/drivers/media/dvb/dvb-usb/nova-t-usb2.c
@@ -21,7 +21,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
21#define deb_ee(args...) dprintk(debug,0x02,args) 21#define deb_ee(args...) dprintk(debug,0x02,args)
22 22
23/* Hauppauge NOVA-T USB2 keys */ 23/* Hauppauge NOVA-T USB2 keys */
24static struct dvb_usb_rc_key ir_codes_haupp_table [] = { 24static struct ir_scancode ir_codes_haupp_table[] = {
25 { 0x1e00, KEY_0 }, 25 { 0x1e00, KEY_0 },
26 { 0x1e01, KEY_1 }, 26 { 0x1e01, KEY_1 },
27 { 0x1e02, KEY_2 }, 27 { 0x1e02, KEY_2 },
@@ -98,7 +98,7 @@ static int nova_t_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
98 deb_rc("c: %x, d: %x\n", rc5_data(&ir_codes_haupp_table[i]), 98 deb_rc("c: %x, d: %x\n", rc5_data(&ir_codes_haupp_table[i]),
99 rc5_custom(&ir_codes_haupp_table[i])); 99 rc5_custom(&ir_codes_haupp_table[i]));
100 100
101 *event = ir_codes_haupp_table[i].event; 101 *event = ir_codes_haupp_table[i].keycode;
102 *state = REMOTE_KEY_PRESSED; 102 *state = REMOTE_KEY_PRESSED;
103 if (st->old_toggle == toggle) { 103 if (st->old_toggle == toggle) {
104 if (st->last_repeat_count++ < 2) 104 if (st->last_repeat_count++ < 2)
diff --git a/drivers/media/dvb/dvb-usb/opera1.c b/drivers/media/dvb/dvb-usb/opera1.c
index dfb81ff1d9a7..6a2f9e25f08a 100644
--- a/drivers/media/dvb/dvb-usb/opera1.c
+++ b/drivers/media/dvb/dvb-usb/opera1.c
@@ -331,7 +331,7 @@ static int opera1_pid_filter_control(struct dvb_usb_adapter *adap, int onoff)
331 return 0; 331 return 0;
332} 332}
333 333
334static struct dvb_usb_rc_key ir_codes_opera1_table[] = { 334static struct ir_scancode ir_codes_opera1_table[] = {
335 {0x5fa0, KEY_1}, 335 {0x5fa0, KEY_1},
336 {0x51af, KEY_2}, 336 {0x51af, KEY_2},
337 {0x5da2, KEY_3}, 337 {0x5da2, KEY_3},
@@ -407,9 +407,9 @@ static int opera1_rc_query(struct dvb_usb_device *dev, u32 * event, int *state)
407 for (i = 0; i < ARRAY_SIZE(ir_codes_opera1_table); i++) { 407 for (i = 0; i < ARRAY_SIZE(ir_codes_opera1_table); i++) {
408 if (rc5_scan(&ir_codes_opera1_table[i]) == (send_key & 0xffff)) { 408 if (rc5_scan(&ir_codes_opera1_table[i]) == (send_key & 0xffff)) {
409 *state = REMOTE_KEY_PRESSED; 409 *state = REMOTE_KEY_PRESSED;
410 *event = ir_codes_opera1_table[i].event; 410 *event = ir_codes_opera1_table[i].keycode;
411 opst->last_key_pressed = 411 opst->last_key_pressed =
412 ir_codes_opera1_table[i].event; 412 ir_codes_opera1_table[i].keycode;
413 break; 413 break;
414 } 414 }
415 opst->last_key_pressed = 0; 415 opst->last_key_pressed = 0;
diff --git a/drivers/media/dvb/dvb-usb/vp702x.c b/drivers/media/dvb/dvb-usb/vp702x.c
index 4d332451653b..7ea57a43757a 100644
--- a/drivers/media/dvb/dvb-usb/vp702x.c
+++ b/drivers/media/dvb/dvb-usb/vp702x.c
@@ -174,7 +174,7 @@ static int vp702x_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
174} 174}
175 175
176/* keys for the enclosed remote control */ 176/* keys for the enclosed remote control */
177static struct dvb_usb_rc_key ir_codes_vp702x_table[] = { 177static struct ir_scancode ir_codes_vp702x_table[] = {
178 { 0x0001, KEY_1 }, 178 { 0x0001, KEY_1 },
179 { 0x0002, KEY_2 }, 179 { 0x0002, KEY_2 },
180}; 180};
@@ -200,7 +200,7 @@ static int vp702x_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
200 for (i = 0; i < ARRAY_SIZE(ir_codes_vp702x_table); i++) 200 for (i = 0; i < ARRAY_SIZE(ir_codes_vp702x_table); i++)
201 if (rc5_custom(&ir_codes_vp702x_table[i]) == key[1]) { 201 if (rc5_custom(&ir_codes_vp702x_table[i]) == key[1]) {
202 *state = REMOTE_KEY_PRESSED; 202 *state = REMOTE_KEY_PRESSED;
203 *event = ir_codes_vp702x_table[i].event; 203 *event = ir_codes_vp702x_table[i].keycode;
204 break; 204 break;
205 } 205 }
206 return 0; 206 return 0;
diff --git a/drivers/media/dvb/dvb-usb/vp7045.c b/drivers/media/dvb/dvb-usb/vp7045.c
index 036893fa4480..30663a85619c 100644
--- a/drivers/media/dvb/dvb-usb/vp7045.c
+++ b/drivers/media/dvb/dvb-usb/vp7045.c
@@ -99,7 +99,7 @@ static int vp7045_power_ctrl(struct dvb_usb_device *d, int onoff)
99 99
100/* The keymapping struct. Somehow this should be loaded to the driver, but 100/* The keymapping struct. Somehow this should be loaded to the driver, but
101 * currently it is hardcoded. */ 101 * currently it is hardcoded. */
102static struct dvb_usb_rc_key ir_codes_vp7045_table[] = { 102static struct ir_scancode ir_codes_vp7045_table[] = {
103 { 0x0016, KEY_POWER }, 103 { 0x0016, KEY_POWER },
104 { 0x0010, KEY_MUTE }, 104 { 0x0010, KEY_MUTE },
105 { 0x0003, KEY_1 }, 105 { 0x0003, KEY_1 },
@@ -168,7 +168,7 @@ static int vp7045_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
168 for (i = 0; i < ARRAY_SIZE(ir_codes_vp7045_table); i++) 168 for (i = 0; i < ARRAY_SIZE(ir_codes_vp7045_table); i++)
169 if (rc5_data(&ir_codes_vp7045_table[i]) == key) { 169 if (rc5_data(&ir_codes_vp7045_table[i]) == key) {
170 *state = REMOTE_KEY_PRESSED; 170 *state = REMOTE_KEY_PRESSED;
171 *event = ir_codes_vp7045_table[i].event; 171 *event = ir_codes_vp7045_table[i].keycode;
172 break; 172 break;
173 } 173 }
174 return 0; 174 return 0;