aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-11-17 13:46:09 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 05:16:51 -0500
commit2f4f58d689dd71dea67407b74405a3c43e797cb1 (patch)
tree8f02ac4a3c8eccc99ee3dae8468e7e5f4c00995c /drivers/media/dvb
parentb088ba658b3438056dab4d744701364db3f08b9a (diff)
[media] rc: Name RC keymap tables as rc_map_table
Remote keytables had different names all over the place. Part of the fault is due to a bad naming when rc subsystem was created, but there were lots of old names that were still here. Use a common standard for everything. Patch generated by this script: for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_scancode,rc_map_table,g <$i >a && mv a $i; done for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_codes_,rc_map_,g <$i >a && mv a $i; done for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_key_map,rc_map_table,g <$i >a && mv a $i; done for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_map_table_size,rc_map_size,g <$i >a && mv a $i; done Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/dvb-usb/a800.c6
-rw-r--r--drivers/media/dvb/dvb-usb/af9005-remote.c16
-rw-r--r--drivers/media/dvb/dvb-usb/af9005.c16
-rw-r--r--drivers/media/dvb/dvb-usb/af9005.h4
-rw-r--r--drivers/media/dvb/dvb-usb/az6027.c6
-rw-r--r--drivers/media/dvb/dvb-usb/cinergyT2-core.c6
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c62
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-common.c4
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-mb.c16
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-mc.c4
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb.h2
-rw-r--r--drivers/media/dvb/dvb-usb/digitv.c14
-rw-r--r--drivers/media/dvb/dvb-usb/dtt200u.c18
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-remote.c26
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb.h14
-rw-r--r--drivers/media/dvb/dvb-usb/dw2102.c54
-rw-r--r--drivers/media/dvb/dvb-usb/m920x.c24
-rw-r--r--drivers/media/dvb/dvb-usb/nova-t-usb2.c18
-rw-r--r--drivers/media/dvb/dvb-usb/opera1.c16
-rw-r--r--drivers/media/dvb/dvb-usb/vp702x.c12
-rw-r--r--drivers/media/dvb/dvb-usb/vp7045.c12
-rw-r--r--drivers/media/dvb/mantis/mantis_input.c2
22 files changed, 176 insertions, 176 deletions
diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a800.c
index a5c363727133..53b93a4b6f8a 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 ir_scancode ir_codes_a800_table[] = { 40static struct rc_map_table rc_map_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 */
@@ -148,8 +148,8 @@ static struct dvb_usb_device_properties a800_properties = {
148 148
149 .rc.legacy = { 149 .rc.legacy = {
150 .rc_interval = DEFAULT_RC_INTERVAL, 150 .rc_interval = DEFAULT_RC_INTERVAL,
151 .rc_key_map = ir_codes_a800_table, 151 .rc_map_table = rc_map_a800_table,
152 .rc_key_map_size = ARRAY_SIZE(ir_codes_a800_table), 152 .rc_map_size = ARRAY_SIZE(rc_map_a800_table),
153 .rc_query = a800_rc_query, 153 .rc_query = a800_rc_query,
154 }, 154 },
155 155
diff --git a/drivers/media/dvb/dvb-usb/af9005-remote.c b/drivers/media/dvb/dvb-usb/af9005-remote.c
index 696207fe37ec..c3bc64ed405c 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 ir_scancode ir_codes_af9005_table[] = { 36struct rc_map_table rc_map_af9005_table[] = {
37 37
38 {0x01b7, KEY_POWER}, 38 {0x01b7, KEY_POWER},
39 {0x01a7, KEY_VOLUMEUP}, 39 {0x01a7, KEY_VOLUMEUP},
@@ -74,7 +74,7 @@ struct ir_scancode ir_codes_af9005_table[] = {
74 {0x00d5, KEY_GOTO}, /* marked jump on the remote */ 74 {0x00d5, KEY_GOTO}, /* marked jump on the remote */
75}; 75};
76 76
77int ir_codes_af9005_table_size = ARRAY_SIZE(ir_codes_af9005_table); 77int rc_map_af9005_table_size = ARRAY_SIZE(rc_map_af9005_table);
78 78
79static int repeatable_keys[] = { 79static int repeatable_keys[] = {
80 KEY_VOLUMEUP, 80 KEY_VOLUMEUP,
@@ -130,10 +130,10 @@ int af9005_rc_decode(struct dvb_usb_device *d, u8 * data, int len, u32 * event,
130 deb_decode("code != inverted code\n"); 130 deb_decode("code != inverted code\n");
131 return 0; 131 return 0;
132 } 132 }
133 for (i = 0; i < ir_codes_af9005_table_size; i++) { 133 for (i = 0; i < rc_map_af9005_table_size; i++) {
134 if (rc5_custom(&ir_codes_af9005_table[i]) == cust 134 if (rc5_custom(&rc_map_af9005_table[i]) == cust
135 && rc5_data(&ir_codes_af9005_table[i]) == dat) { 135 && rc5_data(&rc_map_af9005_table[i]) == dat) {
136 *event = ir_codes_af9005_table[i].keycode; 136 *event = rc_map_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);
@@ -146,8 +146,8 @@ int af9005_rc_decode(struct dvb_usb_device *d, u8 * data, int len, u32 * event,
146 return 0; 146 return 0;
147} 147}
148 148
149EXPORT_SYMBOL(ir_codes_af9005_table); 149EXPORT_SYMBOL(rc_map_af9005_table);
150EXPORT_SYMBOL(ir_codes_af9005_table_size); 150EXPORT_SYMBOL(rc_map_af9005_table_size);
151EXPORT_SYMBOL(af9005_rc_decode); 151EXPORT_SYMBOL(af9005_rc_decode);
152 152
153MODULE_AUTHOR("Luca Olivetti <luca@ventoso.org>"); 153MODULE_AUTHOR("Luca Olivetti <luca@ventoso.org>");
diff --git a/drivers/media/dvb/dvb-usb/af9005.c b/drivers/media/dvb/dvb-usb/af9005.c
index 8ecba8848bcf..51f6439dcfd5 100644
--- a/drivers/media/dvb/dvb-usb/af9005.c
+++ b/drivers/media/dvb/dvb-usb/af9005.c
@@ -1027,8 +1027,8 @@ static struct dvb_usb_device_properties af9005_properties = {
1027 1027
1028 .rc.legacy = { 1028 .rc.legacy = {
1029 .rc_interval = 200, 1029 .rc_interval = 200,
1030 .rc_key_map = NULL, 1030 .rc_map_table = NULL,
1031 .rc_key_map_size = 0, 1031 .rc_map_size = 0,
1032 .rc_query = af9005_rc_query, 1032 .rc_query = af9005_rc_query,
1033 }, 1033 },
1034 1034
@@ -1070,14 +1070,14 @@ static int __init af9005_usb_module_init(void)
1070 return result; 1070 return result;
1071 } 1071 }
1072 rc_decode = symbol_request(af9005_rc_decode); 1072 rc_decode = symbol_request(af9005_rc_decode);
1073 rc_keys = symbol_request(ir_codes_af9005_table); 1073 rc_keys = symbol_request(rc_map_af9005_table);
1074 rc_keys_size = symbol_request(ir_codes_af9005_table_size); 1074 rc_keys_size = symbol_request(rc_map_af9005_table_size);
1075 if (rc_decode == NULL || rc_keys == NULL || rc_keys_size == NULL) { 1075 if (rc_decode == NULL || rc_keys == NULL || rc_keys_size == NULL) {
1076 err("af9005_rc_decode function not found, disabling remote"); 1076 err("af9005_rc_decode function not found, disabling remote");
1077 af9005_properties.rc.legacy.rc_query = NULL; 1077 af9005_properties.rc.legacy.rc_query = NULL;
1078 } else { 1078 } else {
1079 af9005_properties.rc.legacy.rc_key_map = rc_keys; 1079 af9005_properties.rc.legacy.rc_map_table = rc_keys;
1080 af9005_properties.rc.legacy.rc_key_map_size = *rc_keys_size; 1080 af9005_properties.rc.legacy.rc_map_size = *rc_keys_size;
1081 } 1081 }
1082 1082
1083 return 0; 1083 return 0;
@@ -1089,9 +1089,9 @@ static void __exit af9005_usb_module_exit(void)
1089 if (rc_decode != NULL) 1089 if (rc_decode != NULL)
1090 symbol_put(af9005_rc_decode); 1090 symbol_put(af9005_rc_decode);
1091 if (rc_keys != NULL) 1091 if (rc_keys != NULL)
1092 symbol_put(ir_codes_af9005_table); 1092 symbol_put(rc_map_af9005_table);
1093 if (rc_keys_size != NULL) 1093 if (rc_keys_size != NULL)
1094 symbol_put(ir_codes_af9005_table_size); 1094 symbol_put(rc_map_af9005_table_size);
1095 /* deregister this driver from the USB subsystem */ 1095 /* deregister this driver from the USB subsystem */
1096 usb_deregister(&af9005_usb_driver); 1096 usb_deregister(&af9005_usb_driver);
1097} 1097}
diff --git a/drivers/media/dvb/dvb-usb/af9005.h b/drivers/media/dvb/dvb-usb/af9005.h
index 3c1fbd1c5d60..c71c77bd7f4b 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 ir_scancode ir_codes_af9005_table[]; 3493extern struct rc_map_table rc_map_af9005_table[];
3494extern int ir_codes_af9005_table_size; 3494extern int rc_map_af9005_table_size;
3495 3495
3496#endif 3496#endif
diff --git a/drivers/media/dvb/dvb-usb/az6027.c b/drivers/media/dvb/dvb-usb/az6027.c
index 62c58288469f..9a7837fcfd7f 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 ir_scancode ir_codes_az6027_table[] = { 389static struct rc_map_table rc_map_az6027_table[] = {
390 { 0x01, KEY_1 }, 390 { 0x01, KEY_1 },
391 { 0x02, KEY_2 }, 391 { 0x02, KEY_2 },
392}; 392};
@@ -1126,8 +1126,8 @@ static struct dvb_usb_device_properties az6027_properties = {
1126 .read_mac_address = az6027_read_mac_addr, 1126 .read_mac_address = az6027_read_mac_addr,
1127 */ 1127 */
1128 .rc.legacy = { 1128 .rc.legacy = {
1129 .rc_key_map = ir_codes_az6027_table, 1129 .rc_map_table = rc_map_az6027_table,
1130 .rc_key_map_size = ARRAY_SIZE(ir_codes_az6027_table), 1130 .rc_map_size = ARRAY_SIZE(rc_map_az6027_table),
1131 .rc_interval = 400, 1131 .rc_interval = 400,
1132 .rc_query = az6027_rc_query, 1132 .rc_query = az6027_rc_query,
1133 }, 1133 },
diff --git a/drivers/media/dvb/dvb-usb/cinergyT2-core.c b/drivers/media/dvb/dvb-usb/cinergyT2-core.c
index 4f5aa83fc1fc..16f2ce2bc15a 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 ir_scancode ir_codes_cinergyt2_table[] = { 87static struct rc_map_table rc_map_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 },
@@ -219,8 +219,8 @@ static struct dvb_usb_device_properties cinergyt2_properties = {
219 219
220 .rc.legacy = { 220 .rc.legacy = {
221 .rc_interval = 50, 221 .rc_interval = 50,
222 .rc_key_map = ir_codes_cinergyt2_table, 222 .rc_map_table = rc_map_cinergyt2_table,
223 .rc_key_map_size = ARRAY_SIZE(ir_codes_cinergyt2_table), 223 .rc_map_size = ARRAY_SIZE(rc_map_cinergyt2_table),
224 .rc_query = cinergyt2_rc_query, 224 .rc_query = cinergyt2_rc_query,
225 }, 225 },
226 226
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
index cd9f362c37b2..acb5fb2d2e73 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 ir_scancode *keymap = d->props.rc.legacy.rc_key_map; 388 struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table;
389 u8 ircode[4]; 389 u8 ircode[4];
390 int i; 390 int i;
391 391
@@ -394,7 +394,7 @@ static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
394 *event = 0; 394 *event = 0;
395 *state = REMOTE_NO_KEY_PRESSED; 395 *state = REMOTE_NO_KEY_PRESSED;
396 396
397 for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { 397 for (i = 0; i < d->props.rc.legacy.rc_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].keycode; 400 *event = keymap[i].keycode;
@@ -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 ir_scancode *keymap = d->props.rc.legacy.rc_key_map; 413 struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table;
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,
@@ -422,7 +422,7 @@ static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event,
422 if (cxusb_i2c_xfer(&d->i2c_adap, &msg, 1) != 1) 422 if (cxusb_i2c_xfer(&d->i2c_adap, &msg, 1) != 1)
423 return 0; 423 return 0;
424 424
425 for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { 425 for (i = 0; i < d->props.rc.legacy.rc_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].keycode; 428 *event = keymap[i].keycode;
@@ -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 ir_scancode *keymap = d->props.rc.legacy.rc_key_map; 441 struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table;
442 u8 ircode[2]; 442 u8 ircode[2];
443 int i; 443 int i;
444 444
@@ -448,7 +448,7 @@ static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event,
448 if (cxusb_ctrl_msg(d, 0x10, NULL, 0, ircode, 2) < 0) 448 if (cxusb_ctrl_msg(d, 0x10, NULL, 0, ircode, 2) < 0)
449 return 0; 449 return 0;
450 450
451 for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { 451 for (i = 0; i < d->props.rc.legacy.rc_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].keycode; 454 *event = keymap[i].keycode;
@@ -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 ir_scancode ir_codes_dvico_mce_table[] = { 464static struct rc_map_table rc_map_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 ir_scancode ir_codes_dvico_mce_table[] = {
509 { 0xfe4e, KEY_POWER }, 509 { 0xfe4e, KEY_POWER },
510}; 510};
511 511
512static struct ir_scancode ir_codes_dvico_portable_table[] = { 512static struct rc_map_table rc_map_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 ir_scancode ir_codes_dvico_portable_table[] = {
548 { 0xfc00, KEY_UNKNOWN }, /* HD */ 548 { 0xfc00, KEY_UNKNOWN }, /* HD */
549}; 549};
550 550
551static struct ir_scancode ir_codes_d680_dmb_table[] = { 551static struct rc_map_table rc_map_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 },
@@ -923,7 +923,7 @@ static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap)
923 return -EIO; 923 return -EIO;
924 924
925 /* try to determine if there is no IR decoder on the I2C bus */ 925 /* try to determine if there is no IR decoder on the I2C bus */
926 for (i = 0; adap->dev->props.rc.legacy.rc_key_map != NULL && i < 5; i++) { 926 for (i = 0; adap->dev->props.rc.legacy.rc_map_table != NULL && i < 5; i++) {
927 msleep(20); 927 msleep(20);
928 if (cxusb_i2c_xfer(&adap->dev->i2c_adap, &msg, 1) != 1) 928 if (cxusb_i2c_xfer(&adap->dev->i2c_adap, &msg, 1) != 1)
929 goto no_IR; 929 goto no_IR;
@@ -931,7 +931,7 @@ static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap)
931 continue; 931 continue;
932 if (ircode[2] + ircode[3] != 0xff) { 932 if (ircode[2] + ircode[3] != 0xff) {
933no_IR: 933no_IR:
934 adap->dev->props.rc.legacy.rc_key_map = NULL; 934 adap->dev->props.rc.legacy.rc_map_table = NULL;
935 info("No IR receiver detected on this device."); 935 info("No IR receiver detected on this device.");
936 break; 936 break;
937 } 937 }
@@ -1453,8 +1453,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_lgh064f_properties = {
1453 1453
1454 .rc.legacy = { 1454 .rc.legacy = {
1455 .rc_interval = 100, 1455 .rc_interval = 100,
1456 .rc_key_map = ir_codes_dvico_portable_table, 1456 .rc_map_table = rc_map_dvico_portable_table,
1457 .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), 1457 .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table),
1458 .rc_query = cxusb_rc_query, 1458 .rc_query = cxusb_rc_query,
1459 }, 1459 },
1460 1460
@@ -1506,8 +1506,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_dee1601_properties = {
1506 1506
1507 .rc.legacy = { 1507 .rc.legacy = {
1508 .rc_interval = 150, 1508 .rc_interval = 150,
1509 .rc_key_map = ir_codes_dvico_mce_table, 1509 .rc_map_table = rc_map_dvico_mce_table,
1510 .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table), 1510 .rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table),
1511 .rc_query = cxusb_rc_query, 1511 .rc_query = cxusb_rc_query,
1512 }, 1512 },
1513 1513
@@ -1567,8 +1567,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties = {
1567 1567
1568 .rc.legacy = { 1568 .rc.legacy = {
1569 .rc_interval = 100, 1569 .rc_interval = 100,
1570 .rc_key_map = ir_codes_dvico_portable_table, 1570 .rc_map_table = rc_map_dvico_portable_table,
1571 .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), 1571 .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table),
1572 .rc_query = cxusb_rc_query, 1572 .rc_query = cxusb_rc_query,
1573 }, 1573 },
1574 1574
@@ -1619,8 +1619,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties = {
1619 1619
1620 .rc.legacy = { 1620 .rc.legacy = {
1621 .rc_interval = 100, 1621 .rc_interval = 100,
1622 .rc_key_map = ir_codes_dvico_portable_table, 1622 .rc_map_table = rc_map_dvico_portable_table,
1623 .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), 1623 .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table),
1624 .rc_query = cxusb_rc_query, 1624 .rc_query = cxusb_rc_query,
1625 }, 1625 },
1626 1626
@@ -1670,8 +1670,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties = {
1670 1670
1671 .rc.legacy = { 1671 .rc.legacy = {
1672 .rc_interval = 100, 1672 .rc_interval = 100,
1673 .rc_key_map = ir_codes_dvico_mce_table, 1673 .rc_map_table = rc_map_dvico_mce_table,
1674 .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table), 1674 .rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table),
1675 .rc_query = cxusb_bluebird2_rc_query, 1675 .rc_query = cxusb_bluebird2_rc_query,
1676 }, 1676 },
1677 1677
@@ -1720,8 +1720,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_properties = {
1720 1720
1721 .rc.legacy = { 1721 .rc.legacy = {
1722 .rc_interval = 100, 1722 .rc_interval = 100,
1723 .rc_key_map = ir_codes_dvico_portable_table, 1723 .rc_map_table = rc_map_dvico_portable_table,
1724 .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), 1724 .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table),
1725 .rc_query = cxusb_bluebird2_rc_query, 1725 .rc_query = cxusb_bluebird2_rc_query,
1726 }, 1726 },
1727 1727
@@ -1772,8 +1772,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_needsfirmware_prope
1772 1772
1773 .rc.legacy = { 1773 .rc.legacy = {
1774 .rc_interval = 100, 1774 .rc_interval = 100,
1775 .rc_key_map = ir_codes_dvico_portable_table, 1775 .rc_map_table = rc_map_dvico_portable_table,
1776 .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), 1776 .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table),
1777 .rc_query = cxusb_rc_query, 1777 .rc_query = cxusb_rc_query,
1778 }, 1778 },
1779 1779
@@ -1865,8 +1865,8 @@ struct dvb_usb_device_properties cxusb_bluebird_dualdig4_rev2_properties = {
1865 1865
1866 .rc.legacy = { 1866 .rc.legacy = {
1867 .rc_interval = 100, 1867 .rc_interval = 100,
1868 .rc_key_map = ir_codes_dvico_mce_table, 1868 .rc_map_table = rc_map_dvico_mce_table,
1869 .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table), 1869 .rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table),
1870 .rc_query = cxusb_rc_query, 1870 .rc_query = cxusb_rc_query,
1871 }, 1871 },
1872 1872
@@ -1915,8 +1915,8 @@ static struct dvb_usb_device_properties cxusb_d680_dmb_properties = {
1915 1915
1916 .rc.legacy = { 1916 .rc.legacy = {
1917 .rc_interval = 100, 1917 .rc_interval = 100,
1918 .rc_key_map = ir_codes_d680_dmb_table, 1918 .rc_map_table = rc_map_d680_dmb_table,
1919 .rc_key_map_size = ARRAY_SIZE(ir_codes_d680_dmb_table), 1919 .rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table),
1920 .rc_query = cxusb_d680_dmb_rc_query, 1920 .rc_query = cxusb_d680_dmb_rc_query,
1921 }, 1921 },
1922 1922
@@ -1966,8 +1966,8 @@ static struct dvb_usb_device_properties cxusb_mygica_d689_properties = {
1966 1966
1967 .rc.legacy = { 1967 .rc.legacy = {
1968 .rc_interval = 100, 1968 .rc_interval = 100,
1969 .rc_key_map = ir_codes_d680_dmb_table, 1969 .rc_map_table = rc_map_d680_dmb_table,
1970 .rc_key_map_size = ARRAY_SIZE(ir_codes_d680_dmb_table), 1970 .rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table),
1971 .rc_query = cxusb_d680_dmb_rc_query, 1971 .rc_query = cxusb_d680_dmb_rc_query,
1972 }, 1972 },
1973 1973
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c
index ba991aa21aff..956f7ae2e510 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 ir_scancode ir_codes_dibusb_table[] = { 330struct rc_map_table rc_map_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 },
@@ -456,7 +456,7 @@ struct ir_scancode ir_codes_dibusb_table[] = {
456 { 0x804e, KEY_ENTER }, 456 { 0x804e, KEY_ENTER },
457 { 0x804f, KEY_VOLUMEDOWN }, 457 { 0x804f, KEY_VOLUMEDOWN },
458}; 458};
459EXPORT_SYMBOL(ir_codes_dibusb_table); 459EXPORT_SYMBOL(rc_map_dibusb_table);
460 460
461int dibusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) 461int dibusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
462{ 462{
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c b/drivers/media/dvb/dvb-usb/dibusb-mb.c
index 8e3c0d2cce16..04d91bdd3562 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-mb.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c
@@ -213,8 +213,8 @@ static struct dvb_usb_device_properties dibusb1_1_properties = {
213 213
214 .rc.legacy = { 214 .rc.legacy = {
215 .rc_interval = DEFAULT_RC_INTERVAL, 215 .rc_interval = DEFAULT_RC_INTERVAL,
216 .rc_key_map = ir_codes_dibusb_table, 216 .rc_map_table = rc_map_dibusb_table,
217 .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ 217 .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */
218 .rc_query = dibusb_rc_query, 218 .rc_query = dibusb_rc_query,
219 }, 219 },
220 220
@@ -299,8 +299,8 @@ static struct dvb_usb_device_properties dibusb1_1_an2235_properties = {
299 299
300 .rc.legacy = { 300 .rc.legacy = {
301 .rc_interval = DEFAULT_RC_INTERVAL, 301 .rc_interval = DEFAULT_RC_INTERVAL,
302 .rc_key_map = ir_codes_dibusb_table, 302 .rc_map_table = rc_map_dibusb_table,
303 .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ 303 .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */
304 .rc_query = dibusb_rc_query, 304 .rc_query = dibusb_rc_query,
305 }, 305 },
306 306
@@ -365,8 +365,8 @@ static struct dvb_usb_device_properties dibusb2_0b_properties = {
365 365
366 .rc.legacy = { 366 .rc.legacy = {
367 .rc_interval = DEFAULT_RC_INTERVAL, 367 .rc_interval = DEFAULT_RC_INTERVAL,
368 .rc_key_map = ir_codes_dibusb_table, 368 .rc_map_table = rc_map_dibusb_table,
369 .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ 369 .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */
370 .rc_query = dibusb_rc_query, 370 .rc_query = dibusb_rc_query,
371 }, 371 },
372 372
@@ -424,8 +424,8 @@ static struct dvb_usb_device_properties artec_t1_usb2_properties = {
424 424
425 .rc.legacy = { 425 .rc.legacy = {
426 .rc_interval = DEFAULT_RC_INTERVAL, 426 .rc_interval = DEFAULT_RC_INTERVAL,
427 .rc_key_map = ir_codes_dibusb_table, 427 .rc_map_table = rc_map_dibusb_table,
428 .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ 428 .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */
429 .rc_query = dibusb_rc_query, 429 .rc_query = dibusb_rc_query,
430 }, 430 },
431 431
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mc.c b/drivers/media/dvb/dvb-usb/dibusb-mc.c
index 1cbc41cb4e8f..c1d9094b61e5 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-mc.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-mc.c
@@ -83,8 +83,8 @@ static struct dvb_usb_device_properties dibusb_mc_properties = {
83 83
84 .rc.legacy = { 84 .rc.legacy = {
85 .rc_interval = DEFAULT_RC_INTERVAL, 85 .rc_interval = DEFAULT_RC_INTERVAL,
86 .rc_key_map = ir_codes_dibusb_table, 86 .rc_map_table = rc_map_dibusb_table,
87 .rc_key_map_size = 111, /* FIXME */ 87 .rc_map_size = 111, /* FIXME */
88 .rc_query = dibusb_rc_query, 88 .rc_query = dibusb_rc_query,
89 }, 89 },
90 90
diff --git a/drivers/media/dvb/dvb-usb/dibusb.h b/drivers/media/dvb/dvb-usb/dibusb.h
index 61a6bf389472..e47c321b3ffc 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 ir_scancode ir_codes_dibusb_table[]; 127extern struct rc_map_table rc_map_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 13d006bb19db..f2dbce7edb3b 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 ir_scancode ir_codes_digitv_table[] = { 164static struct rc_map_table rc_map_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 },
@@ -237,10 +237,10 @@ static int digitv_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
237 /* if something is inside the buffer, simulate key press */ 237 /* if something is inside the buffer, simulate key press */
238 if (key[1] != 0) 238 if (key[1] != 0)
239 { 239 {
240 for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { 240 for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) {
241 if (rc5_custom(&d->props.rc.legacy.rc_key_map[i]) == key[1] && 241 if (rc5_custom(&d->props.rc.legacy.rc_map_table[i]) == key[1] &&
242 rc5_data(&d->props.rc.legacy.rc_key_map[i]) == key[2]) { 242 rc5_data(&d->props.rc.legacy.rc_map_table[i]) == key[2]) {
243 *event = d->props.rc.legacy.rc_key_map[i].keycode; 243 *event = d->props.rc.legacy.rc_map_table[i].keycode;
244 *state = REMOTE_KEY_PRESSED; 244 *state = REMOTE_KEY_PRESSED;
245 return 0; 245 return 0;
246 } 246 }
@@ -312,8 +312,8 @@ static struct dvb_usb_device_properties digitv_properties = {
312 312
313 .rc.legacy = { 313 .rc.legacy = {
314 .rc_interval = 1000, 314 .rc_interval = 1000,
315 .rc_key_map = ir_codes_digitv_table, 315 .rc_map_table = rc_map_digitv_table,
316 .rc_key_map_size = ARRAY_SIZE(ir_codes_digitv_table), 316 .rc_map_size = ARRAY_SIZE(rc_map_digitv_table),
317 .rc_query = digitv_rc_query, 317 .rc_query = digitv_rc_query,
318 }, 318 },
319 319
diff --git a/drivers/media/dvb/dvb-usb/dtt200u.c b/drivers/media/dvb/dvb-usb/dtt200u.c
index ca495e07f35c..ecd86eca2548 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 ir_scancode ir_codes_dtt200u_table[] = { 60static struct rc_map_table rc_map_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 },
@@ -163,8 +163,8 @@ static struct dvb_usb_device_properties dtt200u_properties = {
163 163
164 .rc.legacy = { 164 .rc.legacy = {
165 .rc_interval = 300, 165 .rc_interval = 300,
166 .rc_key_map = ir_codes_dtt200u_table, 166 .rc_map_table = rc_map_dtt200u_table,
167 .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), 167 .rc_map_size = ARRAY_SIZE(rc_map_dtt200u_table),
168 .rc_query = dtt200u_rc_query, 168 .rc_query = dtt200u_rc_query,
169 }, 169 },
170 170
@@ -210,8 +210,8 @@ static struct dvb_usb_device_properties wt220u_properties = {
210 210
211 .rc.legacy = { 211 .rc.legacy = {
212 .rc_interval = 300, 212 .rc_interval = 300,
213 .rc_key_map = ir_codes_dtt200u_table, 213 .rc_map_table = rc_map_dtt200u_table,
214 .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), 214 .rc_map_size = ARRAY_SIZE(rc_map_dtt200u_table),
215 .rc_query = dtt200u_rc_query, 215 .rc_query = dtt200u_rc_query,
216 }, 216 },
217 217
@@ -257,8 +257,8 @@ static struct dvb_usb_device_properties wt220u_fc_properties = {
257 257
258 .rc.legacy = { 258 .rc.legacy = {
259 .rc_interval = 300, 259 .rc_interval = 300,
260 .rc_key_map = ir_codes_dtt200u_table, 260 .rc_map_table = rc_map_dtt200u_table,
261 .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), 261 .rc_map_size = ARRAY_SIZE(rc_map_dtt200u_table),
262 .rc_query = dtt200u_rc_query, 262 .rc_query = dtt200u_rc_query,
263 }, 263 },
264 264
@@ -304,8 +304,8 @@ static struct dvb_usb_device_properties wt220u_zl0353_properties = {
304 304
305 .rc.legacy = { 305 .rc.legacy = {
306 .rc_interval = 300, 306 .rc_interval = 300,
307 .rc_key_map = ir_codes_dtt200u_table, 307 .rc_map_table = rc_map_dtt200u_table,
308 .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), 308 .rc_map_size = ARRAY_SIZE(rc_map_dtt200u_table),
309 .rc_query = dtt200u_rc_query, 309 .rc_query = dtt200u_rc_query,
310 }, 310 },
311 311
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
index bbba149a2ceb..c6498f536dff 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
@@ -13,11 +13,11 @@ static int legacy_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 ir_scancode *keymap = d->props.rc.legacy.rc_key_map; 16 struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table;
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.legacy.rc_key_map_size; i++) 20 for (i = 0; i < d->props.rc.legacy.rc_map_size; i++)
21 if (keymap[i].scancode == scancode) { 21 if (keymap[i].scancode == scancode) {
22 *keycode = keymap[i].keycode; 22 *keycode = keymap[i].keycode;
23 return 0; 23 return 0;
@@ -28,7 +28,7 @@ static int legacy_dvb_usb_getkeycode(struct input_dev *dev,
28 * otherwise, input core won't let legacy_dvb_usb_setkeycode 28 * otherwise, input core won't let legacy_dvb_usb_setkeycode
29 * to work 29 * to work
30 */ 30 */
31 for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) 31 for (i = 0; i < d->props.rc.legacy.rc_map_size; i++)
32 if (keymap[i].keycode == KEY_RESERVED || 32 if (keymap[i].keycode == KEY_RESERVED ||
33 keymap[i].keycode == KEY_UNKNOWN) { 33 keymap[i].keycode == KEY_UNKNOWN) {
34 *keycode = KEY_RESERVED; 34 *keycode = KEY_RESERVED;
@@ -43,18 +43,18 @@ static int legacy_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 ir_scancode *keymap = d->props.rc.legacy.rc_key_map; 46 struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table;
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.legacy.rc_key_map_size; i++) 50 for (i = 0; i < d->props.rc.legacy.rc_map_size; i++)
51 if (keymap[i].scancode == scancode) { 51 if (keymap[i].scancode == scancode) {
52 keymap[i].keycode = 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.legacy.rc_key_map_size; i++) 57 for (i = 0; i < d->props.rc.legacy.rc_map_size; i++)
58 if (keymap[i].keycode == KEY_RESERVED || 58 if (keymap[i].keycode == KEY_RESERVED ||
59 keymap[i].keycode == KEY_UNKNOWN) { 59 keymap[i].keycode == KEY_UNKNOWN) {
60 keymap[i].scancode = scancode; 60 keymap[i].scancode = scancode;
@@ -175,11 +175,11 @@ static int legacy_dvb_usb_remote_init(struct dvb_usb_device *d)
175 input_dev->setkeycode = legacy_dvb_usb_setkeycode; 175 input_dev->setkeycode = legacy_dvb_usb_setkeycode;
176 176
177 /* set the bits for the keys */ 177 /* set the bits for the keys */
178 deb_rc("key map size: %d\n", d->props.rc.legacy.rc_key_map_size); 178 deb_rc("key map size: %d\n", d->props.rc.legacy.rc_map_size);
179 for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { 179 for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) {
180 deb_rc("setting bit for event %d item %d\n", 180 deb_rc("setting bit for event %d item %d\n",
181 d->props.rc.legacy.rc_key_map[i].keycode, i); 181 d->props.rc.legacy.rc_map_table[i].keycode, i);
182 set_bit(d->props.rc.legacy.rc_key_map[i].keycode, input_dev->keybit); 182 set_bit(d->props.rc.legacy.rc_map_table[i].keycode, input_dev->keybit);
183 } 183 }
184 184
185 /* setting these two values to non-zero, we have to manage key repeats */ 185 /* setting these two values to non-zero, we have to manage key repeats */
@@ -284,7 +284,7 @@ int dvb_usb_remote_init(struct dvb_usb_device *d)
284 if (dvb_usb_disable_rc_polling) 284 if (dvb_usb_disable_rc_polling)
285 return 0; 285 return 0;
286 286
287 if (d->props.rc.legacy.rc_key_map && d->props.rc.legacy.rc_query) 287 if (d->props.rc.legacy.rc_map_table && d->props.rc.legacy.rc_query)
288 d->props.rc.mode = DVB_RC_LEGACY; 288 d->props.rc.mode = DVB_RC_LEGACY;
289 else if (d->props.rc.core.rc_codes) 289 else if (d->props.rc.core.rc_codes)
290 d->props.rc.mode = DVB_RC_CORE; 290 d->props.rc.mode = DVB_RC_CORE;
@@ -331,7 +331,7 @@ int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d,
331 u8 keybuf[5], u32 *event, int *state) 331 u8 keybuf[5], u32 *event, int *state)
332{ 332{
333 int i; 333 int i;
334 struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; 334 struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table;
335 *event = 0; 335 *event = 0;
336 *state = REMOTE_NO_KEY_PRESSED; 336 *state = REMOTE_NO_KEY_PRESSED;
337 switch (keybuf[0]) { 337 switch (keybuf[0]) {
@@ -344,7 +344,7 @@ int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d,
344 break; 344 break;
345 } 345 }
346 /* See if we can match the raw key code. */ 346 /* See if we can match the raw key code. */
347 for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) 347 for (i = 0; i < d->props.rc.legacy.rc_map_size; i++)
348 if (rc5_custom(&keymap[i]) == keybuf[1] && 348 if (rc5_custom(&keymap[i]) == keybuf[1] &&
349 rc5_data(&keymap[i]) == keybuf[3]) { 349 rc5_data(&keymap[i]) == keybuf[3]) {
350 *event = keymap[i].keycode; 350 *event = keymap[i].keycode;
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h
index 95b1603d5be8..65fa9268e7f7 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb.h
@@ -75,17 +75,17 @@ struct dvb_usb_device_description {
75 struct usb_device_id *warm_ids[DVB_USB_ID_MAX_NUM]; 75 struct usb_device_id *warm_ids[DVB_USB_ID_MAX_NUM];
76}; 76};
77 77
78static inline u8 rc5_custom(struct ir_scancode *key) 78static inline u8 rc5_custom(struct rc_map_table *key)
79{ 79{
80 return (key->scancode >> 8) & 0xff; 80 return (key->scancode >> 8) & 0xff;
81} 81}
82 82
83static inline u8 rc5_data(struct ir_scancode *key) 83static inline u8 rc5_data(struct rc_map_table *key)
84{ 84{
85 return key->scancode & 0xff; 85 return key->scancode & 0xff;
86} 86}
87 87
88static inline u8 rc5_scan(struct ir_scancode *key) 88static inline u8 rc5_scan(struct rc_map_table *key)
89{ 89{
90 return key->scancode & 0xffff; 90 return key->scancode & 0xffff;
91} 91}
@@ -159,9 +159,9 @@ struct dvb_usb_adapter_properties {
159 159
160/** 160/**
161 * struct dvb_rc_legacy - old properties of remote controller 161 * struct dvb_rc_legacy - old properties of remote controller
162 * @rc_key_map: a hard-wired array of struct ir_scancode (NULL to disable 162 * @rc_map_table: a hard-wired array of struct rc_map_table (NULL to disable
163 * remote control handling). 163 * remote control handling).
164 * @rc_key_map_size: number of items in @rc_key_map. 164 * @rc_map_size: number of items in @rc_map_table.
165 * @rc_query: called to query an event event. 165 * @rc_query: called to query an event event.
166 * @rc_interval: time in ms between two queries. 166 * @rc_interval: time in ms between two queries.
167 */ 167 */
@@ -170,8 +170,8 @@ struct dvb_rc_legacy {
170#define REMOTE_NO_KEY_PRESSED 0x00 170#define REMOTE_NO_KEY_PRESSED 0x00
171#define REMOTE_KEY_PRESSED 0x01 171#define REMOTE_KEY_PRESSED 0x01
172#define REMOTE_KEY_REPEAT 0x02 172#define REMOTE_KEY_REPEAT 0x02
173 struct ir_scancode *rc_key_map; 173 struct rc_map_table *rc_map_table;
174 int rc_key_map_size; 174 int rc_map_size;
175 int (*rc_query) (struct dvb_usb_device *, u32 *, int *); 175 int (*rc_query) (struct dvb_usb_device *, u32 *, int *);
176 int rc_interval; 176 int rc_interval;
177}; 177};
diff --git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c
index 774df88dc6e3..2c307ba0d28b 100644
--- a/drivers/media/dvb/dvb-usb/dw2102.c
+++ b/drivers/media/dvb/dvb-usb/dw2102.c
@@ -73,8 +73,8 @@
73 "Please see linux/Documentation/dvb/ for more details " \ 73 "Please see linux/Documentation/dvb/ for more details " \
74 "on firmware-problems." 74 "on firmware-problems."
75 75
76struct ir_codes_dvb_usb_table_table { 76struct rc_map_dvb_usb_table_table {
77 struct ir_scancode *rc_keys; 77 struct rc_map_table *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 ir_scancode ir_codes_dw210x_table[] = { 951static struct rc_map_table rc_map_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 ir_scancode ir_codes_dw210x_table[] = {
982 { 0xf81b, KEY_B }, /*recall*/ 982 { 0xf81b, KEY_B }, /*recall*/
983}; 983};
984 984
985static struct ir_scancode ir_codes_tevii_table[] = { 985static struct rc_map_table rc_map_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 ir_scancode ir_codes_tevii_table[] = {
1032 { 0xf858, KEY_SWITCHVIDEOMODE }, 1032 { 0xf858, KEY_SWITCHVIDEOMODE },
1033}; 1033};
1034 1034
1035static struct ir_scancode ir_codes_tbs_table[] = { 1035static struct rc_map_table rc_map_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 },
@@ -1067,16 +1067,16 @@ static struct ir_scancode ir_codes_tbs_table[] = {
1067 { 0xf89b, KEY_MODE } 1067 { 0xf89b, KEY_MODE }
1068}; 1068};
1069 1069
1070static struct ir_codes_dvb_usb_table_table keys_tables[] = { 1070static struct rc_map_dvb_usb_table_table keys_tables[] = {
1071 { ir_codes_dw210x_table, ARRAY_SIZE(ir_codes_dw210x_table) }, 1071 { rc_map_dw210x_table, ARRAY_SIZE(rc_map_dw210x_table) },
1072 { ir_codes_tevii_table, ARRAY_SIZE(ir_codes_tevii_table) }, 1072 { rc_map_tevii_table, ARRAY_SIZE(rc_map_tevii_table) },
1073 { ir_codes_tbs_table, ARRAY_SIZE(ir_codes_tbs_table) }, 1073 { rc_map_tbs_table, ARRAY_SIZE(rc_map_tbs_table) },
1074}; 1074};
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 ir_scancode *keymap = d->props.rc.legacy.rc_key_map; 1078 struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table;
1079 int keymap_size = d->props.rc.legacy.rc_key_map_size; 1079 int keymap_size = d->props.rc.legacy.rc_map_size;
1080 u8 key[2]; 1080 u8 key[2];
1081 struct i2c_msg msg = { 1081 struct i2c_msg msg = {
1082 .addr = DW2102_RC_QUERY, 1082 .addr = DW2102_RC_QUERY,
@@ -1185,14 +1185,14 @@ static int dw2102_load_firmware(struct usb_device *dev,
1185 /* init registers */ 1185 /* init registers */
1186 switch (dev->descriptor.idProduct) { 1186 switch (dev->descriptor.idProduct) {
1187 case USB_PID_PROF_1100: 1187 case USB_PID_PROF_1100:
1188 s6x0_properties.rc.legacy.rc_key_map = ir_codes_tbs_table; 1188 s6x0_properties.rc.legacy.rc_map_table = rc_map_tbs_table;
1189 s6x0_properties.rc.legacy.rc_key_map_size = 1189 s6x0_properties.rc.legacy.rc_map_size =
1190 ARRAY_SIZE(ir_codes_tbs_table); 1190 ARRAY_SIZE(rc_map_tbs_table);
1191 break; 1191 break;
1192 case USB_PID_TEVII_S650: 1192 case USB_PID_TEVII_S650:
1193 dw2104_properties.rc.legacy.rc_key_map = ir_codes_tevii_table; 1193 dw2104_properties.rc.legacy.rc_map_table = rc_map_tevii_table;
1194 dw2104_properties.rc.legacy.rc_key_map_size = 1194 dw2104_properties.rc.legacy.rc_map_size =
1195 ARRAY_SIZE(ir_codes_tevii_table); 1195 ARRAY_SIZE(rc_map_tevii_table);
1196 case USB_PID_DW2104: 1196 case USB_PID_DW2104:
1197 reset = 1; 1197 reset = 1;
1198 dw210x_op_rw(dev, 0xc4, 0x0000, 0, &reset, 1, 1198 dw210x_op_rw(dev, 0xc4, 0x0000, 0, &reset, 1,
@@ -1257,8 +1257,8 @@ static struct dvb_usb_device_properties dw2102_properties = {
1257 .i2c_algo = &dw2102_serit_i2c_algo, 1257 .i2c_algo = &dw2102_serit_i2c_algo,
1258 1258
1259 .rc.legacy = { 1259 .rc.legacy = {
1260 .rc_key_map = ir_codes_dw210x_table, 1260 .rc_map_table = rc_map_dw210x_table,
1261 .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), 1261 .rc_map_size = ARRAY_SIZE(rc_map_dw210x_table),
1262 .rc_interval = 150, 1262 .rc_interval = 150,
1263 .rc_query = dw2102_rc_query, 1263 .rc_query = dw2102_rc_query,
1264 }, 1264 },
@@ -1310,8 +1310,8 @@ static struct dvb_usb_device_properties dw2104_properties = {
1310 1310
1311 .i2c_algo = &dw2104_i2c_algo, 1311 .i2c_algo = &dw2104_i2c_algo,
1312 .rc.legacy = { 1312 .rc.legacy = {
1313 .rc_key_map = ir_codes_dw210x_table, 1313 .rc_map_table = rc_map_dw210x_table,
1314 .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), 1314 .rc_map_size = ARRAY_SIZE(rc_map_dw210x_table),
1315 .rc_interval = 150, 1315 .rc_interval = 150,
1316 .rc_query = dw2102_rc_query, 1316 .rc_query = dw2102_rc_query,
1317 }, 1317 },
@@ -1359,8 +1359,8 @@ static struct dvb_usb_device_properties dw3101_properties = {
1359 1359
1360 .i2c_algo = &dw3101_i2c_algo, 1360 .i2c_algo = &dw3101_i2c_algo,
1361 .rc.legacy = { 1361 .rc.legacy = {
1362 .rc_key_map = ir_codes_dw210x_table, 1362 .rc_map_table = rc_map_dw210x_table,
1363 .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), 1363 .rc_map_size = ARRAY_SIZE(rc_map_dw210x_table),
1364 .rc_interval = 150, 1364 .rc_interval = 150,
1365 .rc_query = dw2102_rc_query, 1365 .rc_query = dw2102_rc_query,
1366 }, 1366 },
@@ -1404,8 +1404,8 @@ static struct dvb_usb_device_properties s6x0_properties = {
1404 1404
1405 .i2c_algo = &s6x0_i2c_algo, 1405 .i2c_algo = &s6x0_i2c_algo,
1406 .rc.legacy = { 1406 .rc.legacy = {
1407 .rc_key_map = ir_codes_tevii_table, 1407 .rc_map_table = rc_map_tevii_table,
1408 .rc_key_map_size = ARRAY_SIZE(ir_codes_tevii_table), 1408 .rc_map_size = ARRAY_SIZE(rc_map_tevii_table),
1409 .rc_interval = 150, 1409 .rc_interval = 150,
1410 .rc_query = dw2102_rc_query, 1410 .rc_query = dw2102_rc_query,
1411 }, 1411 },
@@ -1468,8 +1468,8 @@ static int dw2102_probe(struct usb_interface *intf,
1468 /* fill only different fields */ 1468 /* fill only different fields */
1469 p7500->firmware = "dvb-usb-p7500.fw"; 1469 p7500->firmware = "dvb-usb-p7500.fw";
1470 p7500->devices[0] = d7500; 1470 p7500->devices[0] = d7500;
1471 p7500->rc.legacy.rc_key_map = ir_codes_tbs_table; 1471 p7500->rc.legacy.rc_map_table = rc_map_tbs_table;
1472 p7500->rc.legacy.rc_key_map_size = ARRAY_SIZE(ir_codes_tbs_table); 1472 p7500->rc.legacy.rc_map_size = ARRAY_SIZE(rc_map_tbs_table);
1473 p7500->adapter->frontend_attach = prof_7500_frontend_attach; 1473 p7500->adapter->frontend_attach = prof_7500_frontend_attach;
1474 1474
1475 if (0 == dvb_usb_device_init(intf, &dw2102_properties, 1475 if (0 == dvb_usb_device_init(intf, &dw2102_properties,
diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c
index bdef1a18b664..da9dc91ce910 100644
--- a/drivers/media/dvb/dvb-usb/m920x.c
+++ b/drivers/media/dvb/dvb-usb/m920x.c
@@ -142,9 +142,9 @@ static int m920x_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
142 if ((ret = m920x_read(d->udev, M9206_CORE, 0x0, M9206_RC_KEY, rc_state + 1, 1)) != 0) 142 if ((ret = m920x_read(d->udev, M9206_CORE, 0x0, M9206_RC_KEY, rc_state + 1, 1)) != 0)
143 goto unlock; 143 goto unlock;
144 144
145 for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) 145 for (i = 0; i < d->props.rc.legacy.rc_map_size; i++)
146 if (rc5_data(&d->props.rc.legacy.rc_key_map[i]) == rc_state[1]) { 146 if (rc5_data(&d->props.rc.legacy.rc_map_table[i]) == rc_state[1]) {
147 *event = d->props.rc.legacy.rc_key_map[i].keycode; 147 *event = d->props.rc.legacy.rc_map_table[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 ir_scancode ir_codes_megasky_table[] = { 592static struct rc_map_table rc_map_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 ir_scancode ir_codes_megasky_table[] = {
608 { 0x000e, KEY_COFFEE }, /* "MTS" */ 608 { 0x000e, KEY_COFFEE }, /* "MTS" */
609}; 609};
610 610
611static struct ir_scancode ir_codes_tvwalkertwin_table[] = { 611static struct rc_map_table rc_map_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 ir_scancode ir_codes_tvwalkertwin_table[] = {
628 { 0x001e, KEY_VOLUMEUP }, 628 { 0x001e, KEY_VOLUMEUP },
629}; 629};
630 630
631static struct ir_scancode ir_codes_pinnacle310e_table[] = { 631static struct rc_map_table rc_map_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 },
@@ -786,8 +786,8 @@ static struct dvb_usb_device_properties megasky_properties = {
786 786
787 .rc.legacy = { 787 .rc.legacy = {
788 .rc_interval = 100, 788 .rc_interval = 100,
789 .rc_key_map = ir_codes_megasky_table, 789 .rc_map_table = rc_map_megasky_table,
790 .rc_key_map_size = ARRAY_SIZE(ir_codes_megasky_table), 790 .rc_map_size = ARRAY_SIZE(rc_map_megasky_table),
791 .rc_query = m920x_rc_query, 791 .rc_query = m920x_rc_query,
792 }, 792 },
793 793
@@ -889,8 +889,8 @@ static struct dvb_usb_device_properties tvwalkertwin_properties = {
889 889
890 .rc.legacy = { 890 .rc.legacy = {
891 .rc_interval = 100, 891 .rc_interval = 100,
892 .rc_key_map = ir_codes_tvwalkertwin_table, 892 .rc_map_table = rc_map_tvwalkertwin_table,
893 .rc_key_map_size = ARRAY_SIZE(ir_codes_tvwalkertwin_table), 893 .rc_map_size = ARRAY_SIZE(rc_map_tvwalkertwin_table),
894 .rc_query = m920x_rc_query, 894 .rc_query = m920x_rc_query,
895 }, 895 },
896 896
@@ -998,8 +998,8 @@ static struct dvb_usb_device_properties pinnacle_pctv310e_properties = {
998 998
999 .rc.legacy = { 999 .rc.legacy = {
1000 .rc_interval = 100, 1000 .rc_interval = 100,
1001 .rc_key_map = ir_codes_pinnacle310e_table, 1001 .rc_map_table = rc_map_pinnacle310e_table,
1002 .rc_key_map_size = ARRAY_SIZE(ir_codes_pinnacle310e_table), 1002 .rc_map_size = ARRAY_SIZE(rc_map_pinnacle310e_table),
1003 .rc_query = m920x_rc_query, 1003 .rc_query = m920x_rc_query,
1004 }, 1004 },
1005 1005
diff --git a/drivers/media/dvb/dvb-usb/nova-t-usb2.c b/drivers/media/dvb/dvb-usb/nova-t-usb2.c
index 181f36a12e2a..9d3cd2de46fc 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 ir_scancode ir_codes_haupp_table[] = { 24static struct rc_map_table rc_map_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 },
@@ -91,14 +91,14 @@ static int nova_t_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
91 91
92 deb_rc("raw key code 0x%02x, 0x%02x, 0x%02x to c: %02x d: %02x toggle: %d\n",key[1],key[2],key[3],custom,data,toggle); 92 deb_rc("raw key code 0x%02x, 0x%02x, 0x%02x to c: %02x d: %02x toggle: %d\n",key[1],key[2],key[3],custom,data,toggle);
93 93
94 for (i = 0; i < ARRAY_SIZE(ir_codes_haupp_table); i++) { 94 for (i = 0; i < ARRAY_SIZE(rc_map_haupp_table); i++) {
95 if (rc5_data(&ir_codes_haupp_table[i]) == data && 95 if (rc5_data(&rc_map_haupp_table[i]) == data &&
96 rc5_custom(&ir_codes_haupp_table[i]) == custom) { 96 rc5_custom(&rc_map_haupp_table[i]) == custom) {
97 97
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(&rc_map_haupp_table[i]),
99 rc5_custom(&ir_codes_haupp_table[i])); 99 rc5_custom(&rc_map_haupp_table[i]));
100 100
101 *event = ir_codes_haupp_table[i].keycode; 101 *event = rc_map_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)
@@ -197,8 +197,8 @@ static struct dvb_usb_device_properties nova_t_properties = {
197 197
198 .rc.legacy = { 198 .rc.legacy = {
199 .rc_interval = 100, 199 .rc_interval = 100,
200 .rc_key_map = ir_codes_haupp_table, 200 .rc_map_table = rc_map_haupp_table,
201 .rc_key_map_size = ARRAY_SIZE(ir_codes_haupp_table), 201 .rc_map_size = ARRAY_SIZE(rc_map_haupp_table),
202 .rc_query = nova_t_rc_query, 202 .rc_query = nova_t_rc_query,
203 }, 203 },
204 204
diff --git a/drivers/media/dvb/dvb-usb/opera1.c b/drivers/media/dvb/dvb-usb/opera1.c
index f896337b4535..1f1b7d6980a5 100644
--- a/drivers/media/dvb/dvb-usb/opera1.c
+++ b/drivers/media/dvb/dvb-usb/opera1.c
@@ -35,7 +35,7 @@
35struct opera1_state { 35struct opera1_state {
36 u32 last_key_pressed; 36 u32 last_key_pressed;
37}; 37};
38struct ir_codes_opera_table { 38struct rc_map_opera_table {
39 u32 keycode; 39 u32 keycode;
40 u32 event; 40 u32 event;
41}; 41};
@@ -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 ir_scancode ir_codes_opera1_table[] = { 334static struct rc_map_table rc_map_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},
@@ -404,12 +404,12 @@ static int opera1_rc_query(struct dvb_usb_device *dev, u32 * event, int *state)
404 404
405 send_key = (send_key & 0xffff) | 0x0100; 405 send_key = (send_key & 0xffff) | 0x0100;
406 406
407 for (i = 0; i < ARRAY_SIZE(ir_codes_opera1_table); i++) { 407 for (i = 0; i < ARRAY_SIZE(rc_map_opera1_table); i++) {
408 if (rc5_scan(&ir_codes_opera1_table[i]) == (send_key & 0xffff)) { 408 if (rc5_scan(&rc_map_opera1_table[i]) == (send_key & 0xffff)) {
409 *state = REMOTE_KEY_PRESSED; 409 *state = REMOTE_KEY_PRESSED;
410 *event = ir_codes_opera1_table[i].keycode; 410 *event = rc_map_opera1_table[i].keycode;
411 opst->last_key_pressed = 411 opst->last_key_pressed =
412 ir_codes_opera1_table[i].keycode; 412 rc_map_opera1_table[i].keycode;
413 break; 413 break;
414 } 414 }
415 opst->last_key_pressed = 0; 415 opst->last_key_pressed = 0;
@@ -497,8 +497,8 @@ static struct dvb_usb_device_properties opera1_properties = {
497 .i2c_algo = &opera1_i2c_algo, 497 .i2c_algo = &opera1_i2c_algo,
498 498
499 .rc.legacy = { 499 .rc.legacy = {
500 .rc_key_map = ir_codes_opera1_table, 500 .rc_map_table = rc_map_opera1_table,
501 .rc_key_map_size = ARRAY_SIZE(ir_codes_opera1_table), 501 .rc_map_size = ARRAY_SIZE(rc_map_opera1_table),
502 .rc_interval = 200, 502 .rc_interval = 200,
503 .rc_query = opera1_rc_query, 503 .rc_query = opera1_rc_query,
504 }, 504 },
diff --git a/drivers/media/dvb/dvb-usb/vp702x.c b/drivers/media/dvb/dvb-usb/vp702x.c
index 5c9f3275aaa0..7890e75600df 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 ir_scancode ir_codes_vp702x_table[] = { 177static struct rc_map_table rc_map_vp702x_table[] = {
178 { 0x0001, KEY_1 }, 178 { 0x0001, KEY_1 },
179 { 0x0002, KEY_2 }, 179 { 0x0002, KEY_2 },
180}; 180};
@@ -197,10 +197,10 @@ static int vp702x_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
197 return 0; 197 return 0;
198 } 198 }
199 199
200 for (i = 0; i < ARRAY_SIZE(ir_codes_vp702x_table); i++) 200 for (i = 0; i < ARRAY_SIZE(rc_map_vp702x_table); i++)
201 if (rc5_custom(&ir_codes_vp702x_table[i]) == key[1]) { 201 if (rc5_custom(&rc_map_vp702x_table[i]) == key[1]) {
202 *state = REMOTE_KEY_PRESSED; 202 *state = REMOTE_KEY_PRESSED;
203 *event = ir_codes_vp702x_table[i].keycode; 203 *event = rc_map_vp702x_table[i].keycode;
204 break; 204 break;
205 } 205 }
206 return 0; 206 return 0;
@@ -284,8 +284,8 @@ static struct dvb_usb_device_properties vp702x_properties = {
284 .read_mac_address = vp702x_read_mac_addr, 284 .read_mac_address = vp702x_read_mac_addr,
285 285
286 .rc.legacy = { 286 .rc.legacy = {
287 .rc_key_map = ir_codes_vp702x_table, 287 .rc_map_table = rc_map_vp702x_table,
288 .rc_key_map_size = ARRAY_SIZE(ir_codes_vp702x_table), 288 .rc_map_size = ARRAY_SIZE(rc_map_vp702x_table),
289 .rc_interval = 400, 289 .rc_interval = 400,
290 .rc_query = vp702x_rc_query, 290 .rc_query = vp702x_rc_query,
291 }, 291 },
diff --git a/drivers/media/dvb/dvb-usb/vp7045.c b/drivers/media/dvb/dvb-usb/vp7045.c
index f13791ca5994..ab0ab3c35e80 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 ir_scancode ir_codes_vp7045_table[] = { 102static struct rc_map_table rc_map_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 },
@@ -165,10 +165,10 @@ static int vp7045_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
165 return 0; 165 return 0;
166 } 166 }
167 167
168 for (i = 0; i < ARRAY_SIZE(ir_codes_vp7045_table); i++) 168 for (i = 0; i < ARRAY_SIZE(rc_map_vp7045_table); i++)
169 if (rc5_data(&ir_codes_vp7045_table[i]) == key) { 169 if (rc5_data(&rc_map_vp7045_table[i]) == key) {
170 *state = REMOTE_KEY_PRESSED; 170 *state = REMOTE_KEY_PRESSED;
171 *event = ir_codes_vp7045_table[i].keycode; 171 *event = rc_map_vp7045_table[i].keycode;
172 break; 172 break;
173 } 173 }
174 return 0; 174 return 0;
@@ -261,8 +261,8 @@ static struct dvb_usb_device_properties vp7045_properties = {
261 261
262 .rc.legacy = { 262 .rc.legacy = {
263 .rc_interval = 400, 263 .rc_interval = 400,
264 .rc_key_map = ir_codes_vp7045_table, 264 .rc_map_table = rc_map_vp7045_table,
265 .rc_key_map_size = ARRAY_SIZE(ir_codes_vp7045_table), 265 .rc_map_size = ARRAY_SIZE(rc_map_vp7045_table),
266 .rc_query = vp7045_rc_query, 266 .rc_query = vp7045_rc_query,
267 }, 267 },
268 268
diff --git a/drivers/media/dvb/mantis/mantis_input.c b/drivers/media/dvb/mantis/mantis_input.c
index cf5f8ca6f685..572929a2cd6f 100644
--- a/drivers/media/dvb/mantis/mantis_input.c
+++ b/drivers/media/dvb/mantis/mantis_input.c
@@ -34,7 +34,7 @@
34#define MODULE_NAME "mantis_core" 34#define MODULE_NAME "mantis_core"
35#define RC_MAP_MANTIS "rc-mantis" 35#define RC_MAP_MANTIS "rc-mantis"
36 36
37static struct ir_scancode mantis_ir_table[] = { 37static struct rc_map_table mantis_ir_table[] = {
38 { 0x29, KEY_POWER }, 38 { 0x29, KEY_POWER },
39 { 0x28, KEY_FAVORITES }, 39 { 0x28, KEY_FAVORITES },
40 { 0x30, KEY_TEXT }, 40 { 0x30, KEY_TEXT },