Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

+274 -274
+3 -3
drivers/media/dvb/dvb-usb/a800.c
··· 37 37 return 0; 38 38 } 39 39 40 - static struct ir_scancode ir_codes_a800_table[] = { 40 + static struct rc_map_table rc_map_a800_table[] = { 41 41 { 0x0201, KEY_PROG1 }, /* SOURCE */ 42 42 { 0x0200, KEY_POWER }, /* POWER */ 43 43 { 0x0205, KEY_1 }, /* 1 */ ··· 148 148 149 149 .rc.legacy = { 150 150 .rc_interval = DEFAULT_RC_INTERVAL, 151 - .rc_key_map = ir_codes_a800_table, 152 - .rc_key_map_size = ARRAY_SIZE(ir_codes_a800_table), 151 + .rc_map_table = rc_map_a800_table, 152 + .rc_map_size = ARRAY_SIZE(rc_map_a800_table), 153 153 .rc_query = a800_rc_query, 154 154 }, 155 155
+8 -8
drivers/media/dvb/dvb-usb/af9005-remote.c
··· 33 33 34 34 #define deb_decode(args...) dprintk(dvb_usb_af9005_remote_debug,0x01,args) 35 35 36 - struct ir_scancode ir_codes_af9005_table[] = { 36 + struct rc_map_table rc_map_af9005_table[] = { 37 37 38 38 {0x01b7, KEY_POWER}, 39 39 {0x01a7, KEY_VOLUMEUP}, ··· 74 74 {0x00d5, KEY_GOTO}, /* marked jump on the remote */ 75 75 }; 76 76 77 - int ir_codes_af9005_table_size = ARRAY_SIZE(ir_codes_af9005_table); 77 + int rc_map_af9005_table_size = ARRAY_SIZE(rc_map_af9005_table); 78 78 79 79 static int repeatable_keys[] = { 80 80 KEY_VOLUMEUP, ··· 130 130 deb_decode("code != inverted code\n"); 131 131 return 0; 132 132 } 133 - for (i = 0; i < ir_codes_af9005_table_size; i++) { 134 - if (rc5_custom(&ir_codes_af9005_table[i]) == cust 135 - && rc5_data(&ir_codes_af9005_table[i]) == dat) { 136 - *event = ir_codes_af9005_table[i].keycode; 133 + for (i = 0; i < rc_map_af9005_table_size; i++) { 134 + if (rc5_custom(&rc_map_af9005_table[i]) == cust 135 + && rc5_data(&rc_map_af9005_table[i]) == dat) { 136 + *event = rc_map_af9005_table[i].keycode; 137 137 *state = REMOTE_KEY_PRESSED; 138 138 deb_decode 139 139 ("key pressed, event %x\n", *event); ··· 146 146 return 0; 147 147 } 148 148 149 - EXPORT_SYMBOL(ir_codes_af9005_table); 150 - EXPORT_SYMBOL(ir_codes_af9005_table_size); 149 + EXPORT_SYMBOL(rc_map_af9005_table); 150 + EXPORT_SYMBOL(rc_map_af9005_table_size); 151 151 EXPORT_SYMBOL(af9005_rc_decode); 152 152 153 153 MODULE_AUTHOR("Luca Olivetti <luca@ventoso.org>");
+8 -8
drivers/media/dvb/dvb-usb/af9005.c
··· 1027 1027 1028 1028 .rc.legacy = { 1029 1029 .rc_interval = 200, 1030 - .rc_key_map = NULL, 1031 - .rc_key_map_size = 0, 1030 + .rc_map_table = NULL, 1031 + .rc_map_size = 0, 1032 1032 .rc_query = af9005_rc_query, 1033 1033 }, 1034 1034 ··· 1070 1070 return result; 1071 1071 } 1072 1072 rc_decode = symbol_request(af9005_rc_decode); 1073 - rc_keys = symbol_request(ir_codes_af9005_table); 1074 - rc_keys_size = symbol_request(ir_codes_af9005_table_size); 1073 + rc_keys = symbol_request(rc_map_af9005_table); 1074 + rc_keys_size = symbol_request(rc_map_af9005_table_size); 1075 1075 if (rc_decode == NULL || rc_keys == NULL || rc_keys_size == NULL) { 1076 1076 err("af9005_rc_decode function not found, disabling remote"); 1077 1077 af9005_properties.rc.legacy.rc_query = NULL; 1078 1078 } else { 1079 - af9005_properties.rc.legacy.rc_key_map = rc_keys; 1080 - af9005_properties.rc.legacy.rc_key_map_size = *rc_keys_size; 1079 + af9005_properties.rc.legacy.rc_map_table = rc_keys; 1080 + af9005_properties.rc.legacy.rc_map_size = *rc_keys_size; 1081 1081 } 1082 1082 1083 1083 return 0; ··· 1089 1089 if (rc_decode != NULL) 1090 1090 symbol_put(af9005_rc_decode); 1091 1091 if (rc_keys != NULL) 1092 - symbol_put(ir_codes_af9005_table); 1092 + symbol_put(rc_map_af9005_table); 1093 1093 if (rc_keys_size != NULL) 1094 - symbol_put(ir_codes_af9005_table_size); 1094 + symbol_put(rc_map_af9005_table_size); 1095 1095 /* deregister this driver from the USB subsystem */ 1096 1096 usb_deregister(&af9005_usb_driver); 1097 1097 }
+2 -2
drivers/media/dvb/dvb-usb/af9005.h
··· 3490 3490 /* remote control decoder */ 3491 3491 extern int af9005_rc_decode(struct dvb_usb_device *d, u8 * data, int len, 3492 3492 u32 * event, int *state); 3493 - extern struct ir_scancode ir_codes_af9005_table[]; 3494 - extern int ir_codes_af9005_table_size; 3493 + extern struct rc_map_table rc_map_af9005_table[]; 3494 + extern int rc_map_af9005_table_size; 3495 3495 3496 3496 #endif
+3 -3
drivers/media/dvb/dvb-usb/az6027.c
··· 386 386 } 387 387 388 388 /* keys for the enclosed remote control */ 389 - static struct ir_scancode ir_codes_az6027_table[] = { 389 + static struct rc_map_table rc_map_az6027_table[] = { 390 390 { 0x01, KEY_1 }, 391 391 { 0x02, KEY_2 }, 392 392 }; ··· 1126 1126 .read_mac_address = az6027_read_mac_addr, 1127 1127 */ 1128 1128 .rc.legacy = { 1129 - .rc_key_map = ir_codes_az6027_table, 1130 - .rc_key_map_size = ARRAY_SIZE(ir_codes_az6027_table), 1129 + .rc_map_table = rc_map_az6027_table, 1130 + .rc_map_size = ARRAY_SIZE(rc_map_az6027_table), 1131 1131 .rc_interval = 400, 1132 1132 .rc_query = az6027_rc_query, 1133 1133 },
+3 -3
drivers/media/dvb/dvb-usb/cinergyT2-core.c
··· 84 84 return 0; 85 85 } 86 86 87 - static struct ir_scancode ir_codes_cinergyt2_table[] = { 87 + static struct rc_map_table rc_map_cinergyt2_table[] = { 88 88 { 0x0401, KEY_POWER }, 89 89 { 0x0402, KEY_1 }, 90 90 { 0x0403, KEY_2 }, ··· 219 219 220 220 .rc.legacy = { 221 221 .rc_interval = 50, 222 - .rc_key_map = ir_codes_cinergyt2_table, 223 - .rc_key_map_size = ARRAY_SIZE(ir_codes_cinergyt2_table), 222 + .rc_map_table = rc_map_cinergyt2_table, 223 + .rc_map_size = ARRAY_SIZE(rc_map_cinergyt2_table), 224 224 .rc_query = cinergyt2_rc_query, 225 225 }, 226 226
+31 -31
drivers/media/dvb/dvb-usb/cxusb.c
··· 385 385 386 386 static 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 389 u8 ircode[4]; 390 390 int i; 391 391 ··· 394 394 *event = 0; 395 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 398 if (rc5_custom(&keymap[i]) == ircode[2] && 399 399 rc5_data(&keymap[i]) == ircode[3]) { 400 400 *event = keymap[i].keycode; ··· 410 410 static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event, 411 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 414 u8 ircode[4]; 415 415 int i; 416 416 struct i2c_msg msg = { .addr = 0x6b, .flags = I2C_M_RD, ··· 422 422 if (cxusb_i2c_xfer(&d->i2c_adap, &msg, 1) != 1) 423 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 426 if (rc5_custom(&keymap[i]) == ircode[1] && 427 427 rc5_data(&keymap[i]) == ircode[2]) { 428 428 *event = keymap[i].keycode; ··· 438 438 static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event, 439 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 442 u8 ircode[2]; 443 443 int i; 444 444 ··· 448 448 if (cxusb_ctrl_msg(d, 0x10, NULL, 0, ircode, 2) < 0) 449 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 452 if (rc5_custom(&keymap[i]) == ircode[0] && 453 453 rc5_data(&keymap[i]) == ircode[1]) { 454 454 *event = keymap[i].keycode; ··· 461 461 return 0; 462 462 } 463 463 464 - static struct ir_scancode ir_codes_dvico_mce_table[] = { 464 + static struct rc_map_table rc_map_dvico_mce_table[] = { 465 465 { 0xfe02, KEY_TV }, 466 466 { 0xfe0e, KEY_MP3 }, 467 467 { 0xfe1a, KEY_DVD }, ··· 509 509 { 0xfe4e, KEY_POWER }, 510 510 }; 511 511 512 - static struct ir_scancode ir_codes_dvico_portable_table[] = { 512 + static struct rc_map_table rc_map_dvico_portable_table[] = { 513 513 { 0xfc02, KEY_SETUP }, /* Profile */ 514 514 { 0xfc43, KEY_POWER2 }, 515 515 { 0xfc06, KEY_EPG }, ··· 548 548 { 0xfc00, KEY_UNKNOWN }, /* HD */ 549 549 }; 550 550 551 - static struct ir_scancode ir_codes_d680_dmb_table[] = { 551 + static struct rc_map_table rc_map_d680_dmb_table[] = { 552 552 { 0x0038, KEY_UNKNOWN }, /* TV/AV */ 553 553 { 0x080c, KEY_ZOOM }, 554 554 { 0x0800, KEY_0 }, ··· 923 923 return -EIO; 924 924 925 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 927 msleep(20); 928 928 if (cxusb_i2c_xfer(&adap->dev->i2c_adap, &msg, 1) != 1) 929 929 goto no_IR; ··· 931 931 continue; 932 932 if (ircode[2] + ircode[3] != 0xff) { 933 933 no_IR: 934 - adap->dev->props.rc.legacy.rc_key_map = NULL; 934 + adap->dev->props.rc.legacy.rc_map_table = NULL; 935 935 info("No IR receiver detected on this device."); 936 936 break; 937 937 } ··· 1453 1453 1454 1454 .rc.legacy = { 1455 1455 .rc_interval = 100, 1456 - .rc_key_map = ir_codes_dvico_portable_table, 1457 - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), 1456 + .rc_map_table = rc_map_dvico_portable_table, 1457 + .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), 1458 1458 .rc_query = cxusb_rc_query, 1459 1459 }, 1460 1460 ··· 1506 1506 1507 1507 .rc.legacy = { 1508 1508 .rc_interval = 150, 1509 - .rc_key_map = ir_codes_dvico_mce_table, 1510 - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table), 1509 + .rc_map_table = rc_map_dvico_mce_table, 1510 + .rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table), 1511 1511 .rc_query = cxusb_rc_query, 1512 1512 }, 1513 1513 ··· 1567 1567 1568 1568 .rc.legacy = { 1569 1569 .rc_interval = 100, 1570 - .rc_key_map = ir_codes_dvico_portable_table, 1571 - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), 1570 + .rc_map_table = rc_map_dvico_portable_table, 1571 + .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), 1572 1572 .rc_query = cxusb_rc_query, 1573 1573 }, 1574 1574 ··· 1619 1619 1620 1620 .rc.legacy = { 1621 1621 .rc_interval = 100, 1622 - .rc_key_map = ir_codes_dvico_portable_table, 1623 - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), 1622 + .rc_map_table = rc_map_dvico_portable_table, 1623 + .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), 1624 1624 .rc_query = cxusb_rc_query, 1625 1625 }, 1626 1626 ··· 1670 1670 1671 1671 .rc.legacy = { 1672 1672 .rc_interval = 100, 1673 - .rc_key_map = ir_codes_dvico_mce_table, 1674 - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table), 1673 + .rc_map_table = rc_map_dvico_mce_table, 1674 + .rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table), 1675 1675 .rc_query = cxusb_bluebird2_rc_query, 1676 1676 }, 1677 1677 ··· 1720 1720 1721 1721 .rc.legacy = { 1722 1722 .rc_interval = 100, 1723 - .rc_key_map = ir_codes_dvico_portable_table, 1724 - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), 1723 + .rc_map_table = rc_map_dvico_portable_table, 1724 + .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), 1725 1725 .rc_query = cxusb_bluebird2_rc_query, 1726 1726 }, 1727 1727 ··· 1772 1772 1773 1773 .rc.legacy = { 1774 1774 .rc_interval = 100, 1775 - .rc_key_map = ir_codes_dvico_portable_table, 1776 - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), 1775 + .rc_map_table = rc_map_dvico_portable_table, 1776 + .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), 1777 1777 .rc_query = cxusb_rc_query, 1778 1778 }, 1779 1779 ··· 1865 1865 1866 1866 .rc.legacy = { 1867 1867 .rc_interval = 100, 1868 - .rc_key_map = ir_codes_dvico_mce_table, 1869 - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table), 1868 + .rc_map_table = rc_map_dvico_mce_table, 1869 + .rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table), 1870 1870 .rc_query = cxusb_rc_query, 1871 1871 }, 1872 1872 ··· 1915 1915 1916 1916 .rc.legacy = { 1917 1917 .rc_interval = 100, 1918 - .rc_key_map = ir_codes_d680_dmb_table, 1919 - .rc_key_map_size = ARRAY_SIZE(ir_codes_d680_dmb_table), 1918 + .rc_map_table = rc_map_d680_dmb_table, 1919 + .rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table), 1920 1920 .rc_query = cxusb_d680_dmb_rc_query, 1921 1921 }, 1922 1922 ··· 1966 1966 1967 1967 .rc.legacy = { 1968 1968 .rc_interval = 100, 1969 - .rc_key_map = ir_codes_d680_dmb_table, 1970 - .rc_key_map_size = ARRAY_SIZE(ir_codes_d680_dmb_table), 1969 + .rc_map_table = rc_map_d680_dmb_table, 1970 + .rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table), 1971 1971 .rc_query = cxusb_d680_dmb_rc_query, 1972 1972 }, 1973 1973
+2 -2
drivers/media/dvb/dvb-usb/dibusb-common.c
··· 327 327 /* 328 328 * common remote control stuff 329 329 */ 330 - struct ir_scancode ir_codes_dibusb_table[] = { 330 + struct rc_map_table rc_map_dibusb_table[] = { 331 331 /* Key codes for the little Artec T1/Twinhan/HAMA/ remote. */ 332 332 { 0x0016, KEY_POWER }, 333 333 { 0x0010, KEY_MUTE }, ··· 456 456 { 0x804e, KEY_ENTER }, 457 457 { 0x804f, KEY_VOLUMEDOWN }, 458 458 }; 459 - EXPORT_SYMBOL(ir_codes_dibusb_table); 459 + EXPORT_SYMBOL(rc_map_dibusb_table); 460 460 461 461 int dibusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) 462 462 {
+8 -8
drivers/media/dvb/dvb-usb/dibusb-mb.c
··· 213 213 214 214 .rc.legacy = { 215 215 .rc_interval = DEFAULT_RC_INTERVAL, 216 - .rc_key_map = ir_codes_dibusb_table, 217 - .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ 216 + .rc_map_table = rc_map_dibusb_table, 217 + .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ 218 218 .rc_query = dibusb_rc_query, 219 219 }, 220 220 ··· 299 299 300 300 .rc.legacy = { 301 301 .rc_interval = DEFAULT_RC_INTERVAL, 302 - .rc_key_map = ir_codes_dibusb_table, 303 - .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ 302 + .rc_map_table = rc_map_dibusb_table, 303 + .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ 304 304 .rc_query = dibusb_rc_query, 305 305 }, 306 306 ··· 365 365 366 366 .rc.legacy = { 367 367 .rc_interval = DEFAULT_RC_INTERVAL, 368 - .rc_key_map = ir_codes_dibusb_table, 369 - .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ 368 + .rc_map_table = rc_map_dibusb_table, 369 + .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ 370 370 .rc_query = dibusb_rc_query, 371 371 }, 372 372 ··· 424 424 425 425 .rc.legacy = { 426 426 .rc_interval = DEFAULT_RC_INTERVAL, 427 - .rc_key_map = ir_codes_dibusb_table, 428 - .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ 427 + .rc_map_table = rc_map_dibusb_table, 428 + .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ 429 429 .rc_query = dibusb_rc_query, 430 430 }, 431 431
+2 -2
drivers/media/dvb/dvb-usb/dibusb-mc.c
··· 83 83 84 84 .rc.legacy = { 85 85 .rc_interval = DEFAULT_RC_INTERVAL, 86 - .rc_key_map = ir_codes_dibusb_table, 87 - .rc_key_map_size = 111, /* FIXME */ 86 + .rc_map_table = rc_map_dibusb_table, 87 + .rc_map_size = 111, /* FIXME */ 88 88 .rc_query = dibusb_rc_query, 89 89 }, 90 90
+1 -1
drivers/media/dvb/dvb-usb/dibusb.h
··· 124 124 #define DEFAULT_RC_INTERVAL 150 125 125 //#define DEFAULT_RC_INTERVAL 100000 126 126 127 - extern struct ir_scancode ir_codes_dibusb_table[]; 127 + extern struct rc_map_table rc_map_dibusb_table[]; 128 128 extern int dibusb_rc_query(struct dvb_usb_device *, u32 *, int *); 129 129 extern int dibusb_read_eeprom_byte(struct dvb_usb_device *, u8, u8 *); 130 130
+7 -7
drivers/media/dvb/dvb-usb/digitv.c
··· 161 161 return 0; 162 162 } 163 163 164 - static struct ir_scancode ir_codes_digitv_table[] = { 164 + static struct rc_map_table rc_map_digitv_table[] = { 165 165 { 0x5f55, KEY_0 }, 166 166 { 0x6f55, KEY_1 }, 167 167 { 0x9f55, KEY_2 }, ··· 237 237 /* if something is inside the buffer, simulate key press */ 238 238 if (key[1] != 0) 239 239 { 240 - for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { 241 - if (rc5_custom(&d->props.rc.legacy.rc_key_map[i]) == key[1] && 242 - rc5_data(&d->props.rc.legacy.rc_key_map[i]) == key[2]) { 243 - *event = d->props.rc.legacy.rc_key_map[i].keycode; 240 + for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) { 241 + if (rc5_custom(&d->props.rc.legacy.rc_map_table[i]) == key[1] && 242 + rc5_data(&d->props.rc.legacy.rc_map_table[i]) == key[2]) { 243 + *event = d->props.rc.legacy.rc_map_table[i].keycode; 244 244 *state = REMOTE_KEY_PRESSED; 245 245 return 0; 246 246 } ··· 312 312 313 313 .rc.legacy = { 314 314 .rc_interval = 1000, 315 - .rc_key_map = ir_codes_digitv_table, 316 - .rc_key_map_size = ARRAY_SIZE(ir_codes_digitv_table), 315 + .rc_map_table = rc_map_digitv_table, 316 + .rc_map_size = ARRAY_SIZE(rc_map_digitv_table), 317 317 .rc_query = digitv_rc_query, 318 318 }, 319 319
+9 -9
drivers/media/dvb/dvb-usb/dtt200u.c
··· 57 57 58 58 /* remote control */ 59 59 /* key list for the tiny remote control (Yakumo, don't know about the others) */ 60 - static struct ir_scancode ir_codes_dtt200u_table[] = { 60 + static struct rc_map_table rc_map_dtt200u_table[] = { 61 61 { 0x8001, KEY_MUTE }, 62 62 { 0x8002, KEY_CHANNELDOWN }, 63 63 { 0x8003, KEY_VOLUMEDOWN }, ··· 163 163 164 164 .rc.legacy = { 165 165 .rc_interval = 300, 166 - .rc_key_map = ir_codes_dtt200u_table, 167 - .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), 166 + .rc_map_table = rc_map_dtt200u_table, 167 + .rc_map_size = ARRAY_SIZE(rc_map_dtt200u_table), 168 168 .rc_query = dtt200u_rc_query, 169 169 }, 170 170 ··· 210 210 211 211 .rc.legacy = { 212 212 .rc_interval = 300, 213 - .rc_key_map = ir_codes_dtt200u_table, 214 - .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), 213 + .rc_map_table = rc_map_dtt200u_table, 214 + .rc_map_size = ARRAY_SIZE(rc_map_dtt200u_table), 215 215 .rc_query = dtt200u_rc_query, 216 216 }, 217 217 ··· 257 257 258 258 .rc.legacy = { 259 259 .rc_interval = 300, 260 - .rc_key_map = ir_codes_dtt200u_table, 261 - .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), 260 + .rc_map_table = rc_map_dtt200u_table, 261 + .rc_map_size = ARRAY_SIZE(rc_map_dtt200u_table), 262 262 .rc_query = dtt200u_rc_query, 263 263 }, 264 264 ··· 304 304 305 305 .rc.legacy = { 306 306 .rc_interval = 300, 307 - .rc_key_map = ir_codes_dtt200u_table, 308 - .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), 307 + .rc_map_table = rc_map_dtt200u_table, 308 + .rc_map_size = ARRAY_SIZE(rc_map_dtt200u_table), 309 309 .rc_query = dtt200u_rc_query, 310 310 }, 311 311
+13 -13
drivers/media/dvb/dvb-usb/dvb-usb-remote.c
··· 13 13 { 14 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 17 int i; 18 18 19 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 21 if (keymap[i].scancode == scancode) { 22 22 *keycode = keymap[i].keycode; 23 23 return 0; ··· 28 28 * otherwise, input core won't let legacy_dvb_usb_setkeycode 29 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 32 if (keymap[i].keycode == KEY_RESERVED || 33 33 keymap[i].keycode == KEY_UNKNOWN) { 34 34 *keycode = KEY_RESERVED; ··· 43 43 { 44 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 47 int i; 48 48 49 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 51 if (keymap[i].scancode == scancode) { 52 52 keymap[i].keycode = keycode; 53 53 return 0; 54 54 } 55 55 56 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 58 if (keymap[i].keycode == KEY_RESERVED || 59 59 keymap[i].keycode == KEY_UNKNOWN) { 60 60 keymap[i].scancode = scancode; ··· 175 175 input_dev->setkeycode = legacy_dvb_usb_setkeycode; 176 176 177 177 /* set the bits for the keys */ 178 - deb_rc("key map size: %d\n", d->props.rc.legacy.rc_key_map_size); 179 - for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { 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_map_size; i++) { 180 180 deb_rc("setting bit for event %d item %d\n", 181 - d->props.rc.legacy.rc_key_map[i].keycode, i); 182 - set_bit(d->props.rc.legacy.rc_key_map[i].keycode, input_dev->keybit); 181 + d->props.rc.legacy.rc_map_table[i].keycode, i); 182 + set_bit(d->props.rc.legacy.rc_map_table[i].keycode, input_dev->keybit); 183 183 } 184 184 185 185 /* setting these two values to non-zero, we have to manage key repeats */ ··· 284 284 if (dvb_usb_disable_rc_polling) 285 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 288 d->props.rc.mode = DVB_RC_LEGACY; 289 289 else if (d->props.rc.core.rc_codes) 290 290 d->props.rc.mode = DVB_RC_CORE; ··· 331 331 u8 keybuf[5], u32 *event, int *state) 332 332 { 333 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 335 *event = 0; 336 336 *state = REMOTE_NO_KEY_PRESSED; 337 337 switch (keybuf[0]) { ··· 344 344 break; 345 345 } 346 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 348 if (rc5_custom(&keymap[i]) == keybuf[1] && 349 349 rc5_data(&keymap[i]) == keybuf[3]) { 350 350 *event = keymap[i].keycode;
+7 -7
drivers/media/dvb/dvb-usb/dvb-usb.h
··· 75 75 struct usb_device_id *warm_ids[DVB_USB_ID_MAX_NUM]; 76 76 }; 77 77 78 - static inline u8 rc5_custom(struct ir_scancode *key) 78 + static inline u8 rc5_custom(struct rc_map_table *key) 79 79 { 80 80 return (key->scancode >> 8) & 0xff; 81 81 } 82 82 83 - static inline u8 rc5_data(struct ir_scancode *key) 83 + static inline u8 rc5_data(struct rc_map_table *key) 84 84 { 85 85 return key->scancode & 0xff; 86 86 } 87 87 88 - static inline u8 rc5_scan(struct ir_scancode *key) 88 + static inline u8 rc5_scan(struct rc_map_table *key) 89 89 { 90 90 return key->scancode & 0xffff; 91 91 } ··· 159 159 160 160 /** 161 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 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 165 * @rc_query: called to query an event event. 166 166 * @rc_interval: time in ms between two queries. 167 167 */ ··· 170 170 #define REMOTE_NO_KEY_PRESSED 0x00 171 171 #define REMOTE_KEY_PRESSED 0x01 172 172 #define REMOTE_KEY_REPEAT 0x02 173 - struct ir_scancode *rc_key_map; 174 - int rc_key_map_size; 173 + struct rc_map_table *rc_map_table; 174 + int rc_map_size; 175 175 int (*rc_query) (struct dvb_usb_device *, u32 *, int *); 176 176 int rc_interval; 177 177 };
+27 -27
drivers/media/dvb/dvb-usb/dw2102.c
··· 73 73 "Please see linux/Documentation/dvb/ for more details " \ 74 74 "on firmware-problems." 75 75 76 - struct ir_codes_dvb_usb_table_table { 77 - struct ir_scancode *rc_keys; 76 + struct rc_map_dvb_usb_table_table { 77 + struct rc_map_table *rc_keys; 78 78 int rc_keys_size; 79 79 }; 80 80 ··· 948 948 return 0; 949 949 } 950 950 951 - static struct ir_scancode ir_codes_dw210x_table[] = { 951 + static struct rc_map_table rc_map_dw210x_table[] = { 952 952 { 0xf80a, KEY_Q }, /*power*/ 953 953 { 0xf80c, KEY_M }, /*mute*/ 954 954 { 0xf811, KEY_1 }, ··· 982 982 { 0xf81b, KEY_B }, /*recall*/ 983 983 }; 984 984 985 - static struct ir_scancode ir_codes_tevii_table[] = { 985 + static struct rc_map_table rc_map_tevii_table[] = { 986 986 { 0xf80a, KEY_POWER }, 987 987 { 0xf80c, KEY_MUTE }, 988 988 { 0xf811, KEY_1 }, ··· 1032 1032 { 0xf858, KEY_SWITCHVIDEOMODE }, 1033 1033 }; 1034 1034 1035 - static struct ir_scancode ir_codes_tbs_table[] = { 1035 + static struct rc_map_table rc_map_tbs_table[] = { 1036 1036 { 0xf884, KEY_POWER }, 1037 1037 { 0xf894, KEY_MUTE }, 1038 1038 { 0xf887, KEY_1 }, ··· 1067 1067 { 0xf89b, KEY_MODE } 1068 1068 }; 1069 1069 1070 - static struct ir_codes_dvb_usb_table_table keys_tables[] = { 1071 - { ir_codes_dw210x_table, ARRAY_SIZE(ir_codes_dw210x_table) }, 1072 - { ir_codes_tevii_table, ARRAY_SIZE(ir_codes_tevii_table) }, 1073 - { ir_codes_tbs_table, ARRAY_SIZE(ir_codes_tbs_table) }, 1070 + static struct rc_map_dvb_usb_table_table keys_tables[] = { 1071 + { rc_map_dw210x_table, ARRAY_SIZE(rc_map_dw210x_table) }, 1072 + { rc_map_tevii_table, ARRAY_SIZE(rc_map_tevii_table) }, 1073 + { rc_map_tbs_table, ARRAY_SIZE(rc_map_tbs_table) }, 1074 1074 }; 1075 1075 1076 1076 static 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; 1079 - int keymap_size = d->props.rc.legacy.rc_key_map_size; 1078 + struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table; 1079 + int keymap_size = d->props.rc.legacy.rc_map_size; 1080 1080 u8 key[2]; 1081 1081 struct i2c_msg msg = { 1082 1082 .addr = DW2102_RC_QUERY, ··· 1185 1185 /* init registers */ 1186 1186 switch (dev->descriptor.idProduct) { 1187 1187 case USB_PID_PROF_1100: 1188 - s6x0_properties.rc.legacy.rc_key_map = ir_codes_tbs_table; 1189 - s6x0_properties.rc.legacy.rc_key_map_size = 1190 - ARRAY_SIZE(ir_codes_tbs_table); 1188 + s6x0_properties.rc.legacy.rc_map_table = rc_map_tbs_table; 1189 + s6x0_properties.rc.legacy.rc_map_size = 1190 + ARRAY_SIZE(rc_map_tbs_table); 1191 1191 break; 1192 1192 case USB_PID_TEVII_S650: 1193 - dw2104_properties.rc.legacy.rc_key_map = ir_codes_tevii_table; 1194 - dw2104_properties.rc.legacy.rc_key_map_size = 1195 - ARRAY_SIZE(ir_codes_tevii_table); 1193 + dw2104_properties.rc.legacy.rc_map_table = rc_map_tevii_table; 1194 + dw2104_properties.rc.legacy.rc_map_size = 1195 + ARRAY_SIZE(rc_map_tevii_table); 1196 1196 case USB_PID_DW2104: 1197 1197 reset = 1; 1198 1198 dw210x_op_rw(dev, 0xc4, 0x0000, 0, &reset, 1, ··· 1257 1257 .i2c_algo = &dw2102_serit_i2c_algo, 1258 1258 1259 1259 .rc.legacy = { 1260 - .rc_key_map = ir_codes_dw210x_table, 1261 - .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), 1260 + .rc_map_table = rc_map_dw210x_table, 1261 + .rc_map_size = ARRAY_SIZE(rc_map_dw210x_table), 1262 1262 .rc_interval = 150, 1263 1263 .rc_query = dw2102_rc_query, 1264 1264 }, ··· 1310 1310 1311 1311 .i2c_algo = &dw2104_i2c_algo, 1312 1312 .rc.legacy = { 1313 - .rc_key_map = ir_codes_dw210x_table, 1314 - .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), 1313 + .rc_map_table = rc_map_dw210x_table, 1314 + .rc_map_size = ARRAY_SIZE(rc_map_dw210x_table), 1315 1315 .rc_interval = 150, 1316 1316 .rc_query = dw2102_rc_query, 1317 1317 }, ··· 1359 1359 1360 1360 .i2c_algo = &dw3101_i2c_algo, 1361 1361 .rc.legacy = { 1362 - .rc_key_map = ir_codes_dw210x_table, 1363 - .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), 1362 + .rc_map_table = rc_map_dw210x_table, 1363 + .rc_map_size = ARRAY_SIZE(rc_map_dw210x_table), 1364 1364 .rc_interval = 150, 1365 1365 .rc_query = dw2102_rc_query, 1366 1366 }, ··· 1404 1404 1405 1405 .i2c_algo = &s6x0_i2c_algo, 1406 1406 .rc.legacy = { 1407 - .rc_key_map = ir_codes_tevii_table, 1408 - .rc_key_map_size = ARRAY_SIZE(ir_codes_tevii_table), 1407 + .rc_map_table = rc_map_tevii_table, 1408 + .rc_map_size = ARRAY_SIZE(rc_map_tevii_table), 1409 1409 .rc_interval = 150, 1410 1410 .rc_query = dw2102_rc_query, 1411 1411 }, ··· 1468 1468 /* fill only different fields */ 1469 1469 p7500->firmware = "dvb-usb-p7500.fw"; 1470 1470 p7500->devices[0] = d7500; 1471 - p7500->rc.legacy.rc_key_map = ir_codes_tbs_table; 1472 - p7500->rc.legacy.rc_key_map_size = ARRAY_SIZE(ir_codes_tbs_table); 1471 + p7500->rc.legacy.rc_map_table = rc_map_tbs_table; 1472 + p7500->rc.legacy.rc_map_size = ARRAY_SIZE(rc_map_tbs_table); 1473 1473 p7500->adapter->frontend_attach = prof_7500_frontend_attach; 1474 1474 1475 1475 if (0 == dvb_usb_device_init(intf, &dw2102_properties,
+12 -12
drivers/media/dvb/dvb-usb/m920x.c
··· 142 142 if ((ret = m920x_read(d->udev, M9206_CORE, 0x0, M9206_RC_KEY, rc_state + 1, 1)) != 0) 143 143 goto unlock; 144 144 145 - for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) 146 - if (rc5_data(&d->props.rc.legacy.rc_key_map[i]) == rc_state[1]) { 147 - *event = d->props.rc.legacy.rc_key_map[i].keycode; 145 + for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) 146 + if (rc5_data(&d->props.rc.legacy.rc_map_table[i]) == rc_state[1]) { 147 + *event = d->props.rc.legacy.rc_map_table[i].keycode; 148 148 149 149 switch(rc_state[0]) { 150 150 case 0x80: ··· 589 589 }; 590 590 591 591 /* ir keymaps */ 592 - static struct ir_scancode ir_codes_megasky_table[] = { 592 + static struct rc_map_table rc_map_megasky_table[] = { 593 593 { 0x0012, KEY_POWER }, 594 594 { 0x001e, KEY_CYCLEWINDOWS }, /* min/max */ 595 595 { 0x0002, KEY_CHANNELUP }, ··· 608 608 { 0x000e, KEY_COFFEE }, /* "MTS" */ 609 609 }; 610 610 611 - static struct ir_scancode ir_codes_tvwalkertwin_table[] = { 611 + static struct rc_map_table rc_map_tvwalkertwin_table[] = { 612 612 { 0x0001, KEY_ZOOM }, /* Full Screen */ 613 613 { 0x0002, KEY_CAMERA }, /* snapshot */ 614 614 { 0x0003, KEY_MUTE }, ··· 628 628 { 0x001e, KEY_VOLUMEUP }, 629 629 }; 630 630 631 - static struct ir_scancode ir_codes_pinnacle310e_table[] = { 631 + static struct rc_map_table rc_map_pinnacle310e_table[] = { 632 632 { 0x16, KEY_POWER }, 633 633 { 0x17, KEY_FAVORITES }, 634 634 { 0x0f, KEY_TEXT }, ··· 786 786 787 787 .rc.legacy = { 788 788 .rc_interval = 100, 789 - .rc_key_map = ir_codes_megasky_table, 790 - .rc_key_map_size = ARRAY_SIZE(ir_codes_megasky_table), 789 + .rc_map_table = rc_map_megasky_table, 790 + .rc_map_size = ARRAY_SIZE(rc_map_megasky_table), 791 791 .rc_query = m920x_rc_query, 792 792 }, 793 793 ··· 889 889 890 890 .rc.legacy = { 891 891 .rc_interval = 100, 892 - .rc_key_map = ir_codes_tvwalkertwin_table, 893 - .rc_key_map_size = ARRAY_SIZE(ir_codes_tvwalkertwin_table), 892 + .rc_map_table = rc_map_tvwalkertwin_table, 893 + .rc_map_size = ARRAY_SIZE(rc_map_tvwalkertwin_table), 894 894 .rc_query = m920x_rc_query, 895 895 }, 896 896 ··· 998 998 999 999 .rc.legacy = { 1000 1000 .rc_interval = 100, 1001 - .rc_key_map = ir_codes_pinnacle310e_table, 1002 - .rc_key_map_size = ARRAY_SIZE(ir_codes_pinnacle310e_table), 1001 + .rc_map_table = rc_map_pinnacle310e_table, 1002 + .rc_map_size = ARRAY_SIZE(rc_map_pinnacle310e_table), 1003 1003 .rc_query = m920x_rc_query, 1004 1004 }, 1005 1005
+9 -9
drivers/media/dvb/dvb-usb/nova-t-usb2.c
··· 21 21 #define deb_ee(args...) dprintk(debug,0x02,args) 22 22 23 23 /* Hauppauge NOVA-T USB2 keys */ 24 - static struct ir_scancode ir_codes_haupp_table[] = { 24 + static struct rc_map_table rc_map_haupp_table[] = { 25 25 { 0x1e00, KEY_0 }, 26 26 { 0x1e01, KEY_1 }, 27 27 { 0x1e02, KEY_2 }, ··· 91 91 92 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++) { 95 - if (rc5_data(&ir_codes_haupp_table[i]) == data && 96 - rc5_custom(&ir_codes_haupp_table[i]) == custom) { 94 + for (i = 0; i < ARRAY_SIZE(rc_map_haupp_table); i++) { 95 + if (rc5_data(&rc_map_haupp_table[i]) == data && 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]), 99 - rc5_custom(&ir_codes_haupp_table[i])); 98 + deb_rc("c: %x, d: %x\n", rc5_data(&rc_map_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 102 *state = REMOTE_KEY_PRESSED; 103 103 if (st->old_toggle == toggle) { 104 104 if (st->last_repeat_count++ < 2) ··· 197 197 198 198 .rc.legacy = { 199 199 .rc_interval = 100, 200 - .rc_key_map = ir_codes_haupp_table, 201 - .rc_key_map_size = ARRAY_SIZE(ir_codes_haupp_table), 200 + .rc_map_table = rc_map_haupp_table, 201 + .rc_map_size = ARRAY_SIZE(rc_map_haupp_table), 202 202 .rc_query = nova_t_rc_query, 203 203 }, 204 204
+8 -8
drivers/media/dvb/dvb-usb/opera1.c
··· 35 35 struct opera1_state { 36 36 u32 last_key_pressed; 37 37 }; 38 - struct ir_codes_opera_table { 38 + struct rc_map_opera_table { 39 39 u32 keycode; 40 40 u32 event; 41 41 }; ··· 331 331 return 0; 332 332 } 333 333 334 - static struct ir_scancode ir_codes_opera1_table[] = { 334 + static struct rc_map_table rc_map_opera1_table[] = { 335 335 {0x5fa0, KEY_1}, 336 336 {0x51af, KEY_2}, 337 337 {0x5da2, KEY_3}, ··· 404 404 405 405 send_key = (send_key & 0xffff) | 0x0100; 406 406 407 - for (i = 0; i < ARRAY_SIZE(ir_codes_opera1_table); i++) { 408 - if (rc5_scan(&ir_codes_opera1_table[i]) == (send_key & 0xffff)) { 407 + for (i = 0; i < ARRAY_SIZE(rc_map_opera1_table); i++) { 408 + if (rc5_scan(&rc_map_opera1_table[i]) == (send_key & 0xffff)) { 409 409 *state = REMOTE_KEY_PRESSED; 410 - *event = ir_codes_opera1_table[i].keycode; 410 + *event = rc_map_opera1_table[i].keycode; 411 411 opst->last_key_pressed = 412 - ir_codes_opera1_table[i].keycode; 412 + rc_map_opera1_table[i].keycode; 413 413 break; 414 414 } 415 415 opst->last_key_pressed = 0; ··· 497 497 .i2c_algo = &opera1_i2c_algo, 498 498 499 499 .rc.legacy = { 500 - .rc_key_map = ir_codes_opera1_table, 501 - .rc_key_map_size = ARRAY_SIZE(ir_codes_opera1_table), 500 + .rc_map_table = rc_map_opera1_table, 501 + .rc_map_size = ARRAY_SIZE(rc_map_opera1_table), 502 502 .rc_interval = 200, 503 503 .rc_query = opera1_rc_query, 504 504 },
+6 -6
drivers/media/dvb/dvb-usb/vp702x.c
··· 174 174 } 175 175 176 176 /* keys for the enclosed remote control */ 177 - static struct ir_scancode ir_codes_vp702x_table[] = { 177 + static struct rc_map_table rc_map_vp702x_table[] = { 178 178 { 0x0001, KEY_1 }, 179 179 { 0x0002, KEY_2 }, 180 180 }; ··· 197 197 return 0; 198 198 } 199 199 200 - for (i = 0; i < ARRAY_SIZE(ir_codes_vp702x_table); i++) 201 - if (rc5_custom(&ir_codes_vp702x_table[i]) == key[1]) { 200 + for (i = 0; i < ARRAY_SIZE(rc_map_vp702x_table); i++) 201 + if (rc5_custom(&rc_map_vp702x_table[i]) == key[1]) { 202 202 *state = REMOTE_KEY_PRESSED; 203 - *event = ir_codes_vp702x_table[i].keycode; 203 + *event = rc_map_vp702x_table[i].keycode; 204 204 break; 205 205 } 206 206 return 0; ··· 284 284 .read_mac_address = vp702x_read_mac_addr, 285 285 286 286 .rc.legacy = { 287 - .rc_key_map = ir_codes_vp702x_table, 288 - .rc_key_map_size = ARRAY_SIZE(ir_codes_vp702x_table), 287 + .rc_map_table = rc_map_vp702x_table, 288 + .rc_map_size = ARRAY_SIZE(rc_map_vp702x_table), 289 289 .rc_interval = 400, 290 290 .rc_query = vp702x_rc_query, 291 291 },
+6 -6
drivers/media/dvb/dvb-usb/vp7045.c
··· 99 99 100 100 /* The keymapping struct. Somehow this should be loaded to the driver, but 101 101 * currently it is hardcoded. */ 102 - static struct ir_scancode ir_codes_vp7045_table[] = { 102 + static struct rc_map_table rc_map_vp7045_table[] = { 103 103 { 0x0016, KEY_POWER }, 104 104 { 0x0010, KEY_MUTE }, 105 105 { 0x0003, KEY_1 }, ··· 165 165 return 0; 166 166 } 167 167 168 - for (i = 0; i < ARRAY_SIZE(ir_codes_vp7045_table); i++) 169 - if (rc5_data(&ir_codes_vp7045_table[i]) == key) { 168 + for (i = 0; i < ARRAY_SIZE(rc_map_vp7045_table); i++) 169 + if (rc5_data(&rc_map_vp7045_table[i]) == key) { 170 170 *state = REMOTE_KEY_PRESSED; 171 - *event = ir_codes_vp7045_table[i].keycode; 171 + *event = rc_map_vp7045_table[i].keycode; 172 172 break; 173 173 } 174 174 return 0; ··· 261 261 262 262 .rc.legacy = { 263 263 .rc_interval = 400, 264 - .rc_key_map = ir_codes_vp7045_table, 265 - .rc_key_map_size = ARRAY_SIZE(ir_codes_vp7045_table), 264 + .rc_map_table = rc_map_vp7045_table, 265 + .rc_map_size = ARRAY_SIZE(rc_map_vp7045_table), 266 266 .rc_query = vp7045_rc_query, 267 267 }, 268 268
+1 -1
drivers/media/dvb/mantis/mantis_input.c
··· 34 34 #define MODULE_NAME "mantis_core" 35 35 #define RC_MAP_MANTIS "rc-mantis" 36 36 37 - static struct ir_scancode mantis_ir_table[] = { 37 + static struct rc_map_table mantis_ir_table[] = { 38 38 { 0x29, KEY_POWER }, 39 39 { 0x28, KEY_FAVORITES }, 40 40 { 0x30, KEY_TEXT },
+1 -1
drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c
··· 14 14 15 15 /* ADS Tech Instant TV DVB-T PCI Remote */ 16 16 17 - static struct ir_scancode adstech_dvb_t_pci[] = { 17 + static struct rc_map_table adstech_dvb_t_pci[] = { 18 18 /* Keys 0 to 9 */ 19 19 { 0x4d, KEY_0 }, 20 20 { 0x57, KEY_1 },
+1 -1
drivers/media/rc/keymaps/rc-anysee.c
··· 20 20 21 21 #include <media/rc-map.h> 22 22 23 - static struct ir_scancode anysee[] = { 23 + static struct rc_map_table anysee[] = { 24 24 { 0x0800, KEY_0 }, 25 25 { 0x0801, KEY_1 }, 26 26 { 0x0802, KEY_2 },
+1 -1
drivers/media/rc/keymaps/rc-apac-viewcomp.c
··· 14 14 15 15 /* Attila Kondoros <attila.kondoros@chello.hu> */ 16 16 17 - static struct ir_scancode apac_viewcomp[] = { 17 + static struct rc_map_table apac_viewcomp[] = { 18 18 19 19 { 0x01, KEY_1 }, 20 20 { 0x02, KEY_2 },
+1 -1
drivers/media/rc/keymaps/rc-asus-pc39.c
··· 18 18 * which has a label saying is "Model PC-39" 19 19 */ 20 20 21 - static struct ir_scancode asus_pc39[] = { 21 + static struct rc_map_table asus_pc39[] = { 22 22 /* Keys 0 to 9 */ 23 23 { 0x082a, KEY_0 }, 24 24 { 0x0816, KEY_1 },
+1 -1
drivers/media/rc/keymaps/rc-ati-tv-wonder-hd-600.c
··· 16 16 Devin Heitmueller <devin.heitmueller@gmail.com> 17 17 */ 18 18 19 - static struct ir_scancode ati_tv_wonder_hd_600[] = { 19 + static struct rc_map_table ati_tv_wonder_hd_600[] = { 20 20 { 0x00, KEY_RECORD}, /* Row 1 */ 21 21 { 0x01, KEY_PLAYPAUSE}, 22 22 { 0x02, KEY_STOP},
+1 -1
drivers/media/rc/keymaps/rc-avermedia-a16d.c
··· 12 12 13 13 #include <media/rc-map.h> 14 14 15 - static struct ir_scancode avermedia_a16d[] = { 15 + static struct rc_map_table avermedia_a16d[] = { 16 16 { 0x20, KEY_LIST}, 17 17 { 0x00, KEY_POWER}, 18 18 { 0x28, KEY_1},
+1 -1
drivers/media/rc/keymaps/rc-avermedia-cardbus.c
··· 14 14 15 15 /* Oldrich Jedlicka <oldium.pro@seznam.cz> */ 16 16 17 - static struct ir_scancode avermedia_cardbus[] = { 17 + static struct rc_map_table avermedia_cardbus[] = { 18 18 { 0x00, KEY_POWER }, 19 19 { 0x01, KEY_TUNER }, /* TV/FM */ 20 20 { 0x03, KEY_TEXT }, /* Teletext */
+1 -1
drivers/media/rc/keymaps/rc-avermedia-dvbt.c
··· 14 14 15 15 /* Matt Jesson <dvb@jesson.eclipse.co.uk */ 16 16 17 - static struct ir_scancode avermedia_dvbt[] = { 17 + static struct rc_map_table avermedia_dvbt[] = { 18 18 { 0x28, KEY_0 }, /* '0' / 'enter' */ 19 19 { 0x22, KEY_1 }, /* '1' */ 20 20 { 0x12, KEY_2 }, /* '2' / 'up arrow' */
+1 -1
drivers/media/rc/keymaps/rc-avermedia-m135a.c
··· 22 22 * codes added by Herton Ronaldo Krzesinski <herton@mandriva.com.br> 23 23 */ 24 24 25 - static struct ir_scancode avermedia_m135a[] = { 25 + static struct rc_map_table avermedia_m135a[] = { 26 26 /* RM-JX */ 27 27 { 0x0200, KEY_POWER2 }, 28 28 { 0x022e, KEY_DOT }, /* '.' */
+1 -1
drivers/media/rc/keymaps/rc-avermedia-m733a-rm-k6.c
··· 16 16 * Herton Ronaldo Krzesinski <herton@mandriva.com.br> 17 17 */ 18 18 19 - static struct ir_scancode avermedia_m733a_rm_k6[] = { 19 + static struct rc_map_table avermedia_m733a_rm_k6[] = { 20 20 { 0x0401, KEY_POWER2 }, 21 21 { 0x0406, KEY_MUTE }, 22 22 { 0x0408, KEY_MODE }, /* TV/FM */
+1 -1
drivers/media/rc/keymaps/rc-avermedia-rm-ks.c
··· 23 23 /* Initial keytable is from Jose Alberto Reguero <jareguero@telefonica.net> 24 24 and Felipe Morales Moreno <felipe.morales.moreno@gmail.com> */ 25 25 /* FIXME: mappings are not 100% correct? */ 26 - static struct ir_scancode avermedia_rm_ks[] = { 26 + static struct rc_map_table avermedia_rm_ks[] = { 27 27 { 0x0501, KEY_POWER2 }, 28 28 { 0x0502, KEY_CHANNELUP }, 29 29 { 0x0503, KEY_CHANNELDOWN },
+1 -1
drivers/media/rc/keymaps/rc-avermedia.c
··· 14 14 15 15 /* Alex Hermann <gaaf@gmx.net> */ 16 16 17 - static struct ir_scancode avermedia[] = { 17 + static struct rc_map_table avermedia[] = { 18 18 { 0x28, KEY_1 }, 19 19 { 0x18, KEY_2 }, 20 20 { 0x38, KEY_3 },
+1 -1
drivers/media/rc/keymaps/rc-avertv-303.c
··· 14 14 15 15 /* AVERTV STUDIO 303 Remote */ 16 16 17 - static struct ir_scancode avertv_303[] = { 17 + static struct rc_map_table avertv_303[] = { 18 18 { 0x2a, KEY_1 }, 19 19 { 0x32, KEY_2 }, 20 20 { 0x3a, KEY_3 },
+1 -1
drivers/media/rc/keymaps/rc-azurewave-ad-tu700.c
··· 20 20 21 21 #include <media/rc-map.h> 22 22 23 - static struct ir_scancode azurewave_ad_tu700[] = { 23 + static struct rc_map_table azurewave_ad_tu700[] = { 24 24 { 0x0000, KEY_TAB }, /* Tab */ 25 25 { 0x0001, KEY_2 }, 26 26 { 0x0002, KEY_CHANNELDOWN },
+1 -1
drivers/media/rc/keymaps/rc-behold-columbus.c
··· 21 21 * helps to descide which keycodes to assign to the buttons. 22 22 */ 23 23 24 - static struct ir_scancode behold_columbus[] = { 24 + static struct rc_map_table behold_columbus[] = { 25 25 26 26 /* 0x13 0x11 0x1C 0x12 * 27 27 * Mute Source TV/FM Power *
+1 -1
drivers/media/rc/keymaps/rc-behold.c
··· 24 24 * helps to descide which keycodes to assign to the buttons. 25 25 */ 26 26 27 - static struct ir_scancode behold[] = { 27 + static struct rc_map_table behold[] = { 28 28 29 29 /* 0x1c 0x12 * 30 30 * TV/FM POWER *
+1 -1
drivers/media/rc/keymaps/rc-budget-ci-old.c
··· 18 18 * This is a "middle of the road" approach, differences are noted 19 19 */ 20 20 21 - static struct ir_scancode budget_ci_old[] = { 21 + static struct rc_map_table budget_ci_old[] = { 22 22 { 0x00, KEY_0 }, 23 23 { 0x01, KEY_1 }, 24 24 { 0x02, KEY_2 },
+1 -1
drivers/media/rc/keymaps/rc-cinergy-1400.c
··· 14 14 15 15 /* Cinergy 1400 DVB-T */ 16 16 17 - static struct ir_scancode cinergy_1400[] = { 17 + static struct rc_map_table cinergy_1400[] = { 18 18 { 0x01, KEY_POWER }, 19 19 { 0x02, KEY_1 }, 20 20 { 0x03, KEY_2 },
+1 -1
drivers/media/rc/keymaps/rc-cinergy.c
··· 12 12 13 13 #include <media/rc-map.h> 14 14 15 - static struct ir_scancode cinergy[] = { 15 + static struct rc_map_table cinergy[] = { 16 16 { 0x00, KEY_0 }, 17 17 { 0x01, KEY_1 }, 18 18 { 0x02, KEY_2 },
+1 -1
drivers/media/rc/keymaps/rc-dib0700-nec.c
··· 17 17 18 18 #include <media/rc-map.h> 19 19 20 - static struct ir_scancode dib0700_nec_table[] = { 20 + static struct rc_map_table dib0700_nec_table[] = { 21 21 /* Key codes for the Pixelview SBTVD remote */ 22 22 { 0x8613, KEY_MUTE }, 23 23 { 0x8612, KEY_POWER },
+1 -1
drivers/media/rc/keymaps/rc-dib0700-rc5.c
··· 17 17 18 18 #include <media/rc-map.h> 19 19 20 - static struct ir_scancode dib0700_rc5_table[] = { 20 + static struct rc_map_table dib0700_rc5_table[] = { 21 21 /* Key codes for the tiny Pinnacle remote*/ 22 22 { 0x0700, KEY_MUTE }, 23 23 { 0x0701, KEY_MENU }, /* Pinnacle logo */
+1 -1
drivers/media/rc/keymaps/rc-digitalnow-tinytwin.c
··· 20 20 21 21 #include <media/rc-map.h> 22 22 23 - static struct ir_scancode digitalnow_tinytwin[] = { 23 + static struct rc_map_table digitalnow_tinytwin[] = { 24 24 { 0x0000, KEY_MUTE }, /* [symbol speaker] */ 25 25 { 0x0001, KEY_VOLUMEUP }, 26 26 { 0x0002, KEY_POWER2 }, /* TV [power button] */
+1 -1
drivers/media/rc/keymaps/rc-digittrade.c
··· 25 25 Initial keytable was from Alain Kalker <miki@dds.nl> */ 26 26 27 27 /* Digittrade DVB-T USB Stick */ 28 - static struct ir_scancode digittrade[] = { 28 + static struct rc_map_table digittrade[] = { 29 29 { 0x0000, KEY_9 }, 30 30 { 0x0001, KEY_EPG }, /* EPG */ 31 31 { 0x0002, KEY_VOLUMEDOWN }, /* Vol Dn */
+1 -1
drivers/media/rc/keymaps/rc-dm1105-nec.c
··· 16 16 Igor M. Liplianin <liplianin@me.by> 17 17 */ 18 18 19 - static struct ir_scancode dm1105_nec[] = { 19 + static struct rc_map_table dm1105_nec[] = { 20 20 { 0x0a, KEY_POWER2}, /* power */ 21 21 { 0x0c, KEY_MUTE}, /* mute */ 22 22 { 0x11, KEY_1},
+1 -1
drivers/media/rc/keymaps/rc-dntv-live-dvb-t.c
··· 14 14 15 15 /* DigitalNow DNTV Live DVB-T Remote */ 16 16 17 - static struct ir_scancode dntv_live_dvb_t[] = { 17 + static struct rc_map_table dntv_live_dvb_t[] = { 18 18 { 0x00, KEY_ESC }, /* 'go up a level?' */ 19 19 /* Keys 0 to 9 */ 20 20 { 0x0a, KEY_0 },
+1 -1
drivers/media/rc/keymaps/rc-dntv-live-dvbt-pro.c
··· 14 14 15 15 /* DigitalNow DNTV Live! DVB-T Pro Remote */ 16 16 17 - static struct ir_scancode dntv_live_dvbt_pro[] = { 17 + static struct rc_map_table dntv_live_dvbt_pro[] = { 18 18 { 0x16, KEY_POWER }, 19 19 { 0x5b, KEY_HOME }, 20 20
+1 -1
drivers/media/rc/keymaps/rc-em-terratec.c
··· 12 12 13 13 #include <media/rc-map.h> 14 14 15 - static struct ir_scancode em_terratec[] = { 15 + static struct rc_map_table em_terratec[] = { 16 16 { 0x01, KEY_CHANNEL }, 17 17 { 0x02, KEY_SELECT }, 18 18 { 0x03, KEY_MUTE },
+1 -1
drivers/media/rc/keymaps/rc-encore-enltv-fm53.c
··· 16 16 Mauro Carvalho Chehab <mchehab@infradead.org> 17 17 */ 18 18 19 - static struct ir_scancode encore_enltv_fm53[] = { 19 + static struct rc_map_table encore_enltv_fm53[] = { 20 20 { 0x10, KEY_POWER2}, 21 21 { 0x06, KEY_MUTE}, 22 22
+1 -1
drivers/media/rc/keymaps/rc-encore-enltv.c
··· 15 15 /* Encore ENLTV-FM - black plastic, white front cover with white glowing buttons 16 16 Juan Pablo Sormani <sorman@gmail.com> */ 17 17 18 - static struct ir_scancode encore_enltv[] = { 18 + static struct rc_map_table encore_enltv[] = { 19 19 20 20 /* Power button does nothing, neither in Windows app, 21 21 although it sends data (used for BIOS wakeup?) */
+1 -1
drivers/media/rc/keymaps/rc-encore-enltv2.c
··· 15 15 /* Encore ENLTV2-FM - silver plastic - "Wand Media" written at the botton 16 16 Mauro Carvalho Chehab <mchehab@infradead.org> */ 17 17 18 - static struct ir_scancode encore_enltv2[] = { 18 + static struct rc_map_table encore_enltv2[] = { 19 19 { 0x4c, KEY_POWER2 }, 20 20 { 0x4a, KEY_TUNER }, 21 21 { 0x40, KEY_1 },
+1 -1
drivers/media/rc/keymaps/rc-evga-indtube.c
··· 16 16 Devin Heitmueller <devin.heitmueller@gmail.com> 17 17 */ 18 18 19 - static struct ir_scancode evga_indtube[] = { 19 + static struct rc_map_table evga_indtube[] = { 20 20 { 0x12, KEY_POWER}, 21 21 { 0x02, KEY_MODE}, /* TV */ 22 22 { 0x14, KEY_MUTE},
+1 -1
drivers/media/rc/keymaps/rc-eztv.c
··· 15 15 /* Alfons Geser <a.geser@cox.net> 16 16 * updates from Job D. R. Borges <jobdrb@ig.com.br> */ 17 17 18 - static struct ir_scancode eztv[] = { 18 + static struct rc_map_table eztv[] = { 19 19 { 0x12, KEY_POWER }, 20 20 { 0x01, KEY_TV }, /* DVR */ 21 21 { 0x15, KEY_DVD }, /* DVD */
+1 -1
drivers/media/rc/keymaps/rc-flydvb.c
··· 12 12 13 13 #include <media/rc-map.h> 14 14 15 - static struct ir_scancode flydvb[] = { 15 + static struct rc_map_table flydvb[] = { 16 16 { 0x01, KEY_ZOOM }, /* Full Screen */ 17 17 { 0x00, KEY_POWER }, /* Power */ 18 18
+1 -1
drivers/media/rc/keymaps/rc-flyvideo.c
··· 12 12 13 13 #include <media/rc-map.h> 14 14 15 - static struct ir_scancode flyvideo[] = { 15 + static struct rc_map_table flyvideo[] = { 16 16 { 0x0f, KEY_0 }, 17 17 { 0x03, KEY_1 }, 18 18 { 0x04, KEY_2 },
+1 -1
drivers/media/rc/keymaps/rc-fusionhdtv-mce.c
··· 14 14 15 15 /* DViCO FUSION HDTV MCE remote */ 16 16 17 - static struct ir_scancode fusionhdtv_mce[] = { 17 + static struct rc_map_table fusionhdtv_mce[] = { 18 18 19 19 { 0x0b, KEY_1 }, 20 20 { 0x17, KEY_2 },
+1 -1
drivers/media/rc/keymaps/rc-gadmei-rm008z.c
··· 16 16 Shine Liu <shinel@foxmail.com> 17 17 */ 18 18 19 - static struct ir_scancode gadmei_rm008z[] = { 19 + static struct rc_map_table gadmei_rm008z[] = { 20 20 { 0x14, KEY_POWER2}, /* POWER OFF */ 21 21 { 0x0c, KEY_MUTE}, /* MUTE */ 22 22
+1 -1
drivers/media/rc/keymaps/rc-genius-tvgo-a11mce.c
··· 17 17 * Adrian Pardini <pardo.bsso@gmail.com> 18 18 */ 19 19 20 - static struct ir_scancode genius_tvgo_a11mce[] = { 20 + static struct rc_map_table genius_tvgo_a11mce[] = { 21 21 /* Keys 0 to 9 */ 22 22 { 0x48, KEY_0 }, 23 23 { 0x09, KEY_1 },
+1 -1
drivers/media/rc/keymaps/rc-gotview7135.c
··· 14 14 15 15 /* Mike Baikov <mike@baikov.com> */ 16 16 17 - static struct ir_scancode gotview7135[] = { 17 + static struct rc_map_table gotview7135[] = { 18 18 19 19 { 0x11, KEY_POWER }, 20 20 { 0x35, KEY_TV },
+1 -1
drivers/media/rc/keymaps/rc-hauppauge-new.c
··· 16 16 * slightly different versions), shipped with cx88+ivtv cards. 17 17 * almost rc5 coding, but some non-standard keys */ 18 18 19 - static struct ir_scancode hauppauge_new[] = { 19 + static struct rc_map_table hauppauge_new[] = { 20 20 /* Keys 0 to 9 */ 21 21 { 0x00, KEY_0 }, 22 22 { 0x01, KEY_1 },
+1 -1
drivers/media/rc/keymaps/rc-imon-mce.c
··· 12 12 #include <media/rc-map.h> 13 13 14 14 /* mce-mode imon mce remote key table */ 15 - static struct ir_scancode imon_mce[] = { 15 + static struct rc_map_table imon_mce[] = { 16 16 /* keys sorted mostly by frequency of use to optimize lookups */ 17 17 { 0x800ff415, KEY_REWIND }, 18 18 { 0x800ff414, KEY_FASTFORWARD },
+1 -1
drivers/media/rc/keymaps/rc-imon-pad.c
··· 17 17 * same remote to different hex codes, and the silkscreened names 18 18 * vary a bit between the SoundGraph and Antec remotes... ugh. 19 19 */ 20 - static struct ir_scancode imon_pad[] = { 20 + static struct rc_map_table imon_pad[] = { 21 21 /* keys sorted mostly by frequency of use to optimize lookups */ 22 22 { 0x2a8195b7, KEY_REWIND }, 23 23 { 0x298315b7, KEY_REWIND },
+1 -1
drivers/media/rc/keymaps/rc-iodata-bctv7e.c
··· 14 14 15 15 /* IO-DATA BCTV7E Remote */ 16 16 17 - static struct ir_scancode iodata_bctv7e[] = { 17 + static struct rc_map_table iodata_bctv7e[] = { 18 18 { 0x40, KEY_TV }, 19 19 { 0x20, KEY_RADIO }, /* FM */ 20 20 { 0x60, KEY_EPG },
+1 -1
drivers/media/rc/keymaps/rc-kaiomy.c
··· 16 16 Mauro Carvalho Chehab <mchehab@infradead.org> 17 17 */ 18 18 19 - static struct ir_scancode kaiomy[] = { 19 + static struct rc_map_table kaiomy[] = { 20 20 { 0x43, KEY_POWER2}, 21 21 { 0x01, KEY_LIST}, 22 22 { 0x0b, KEY_ZOOM},
+1 -1
drivers/media/rc/keymaps/rc-kworld-315u.c
··· 15 15 /* Kworld 315U 16 16 */ 17 17 18 - static struct ir_scancode kworld_315u[] = { 18 + static struct rc_map_table kworld_315u[] = { 19 19 { 0x6143, KEY_POWER }, 20 20 { 0x6101, KEY_TUNER }, /* source */ 21 21 { 0x610b, KEY_ZOOM },
+1 -1
drivers/media/rc/keymaps/rc-kworld-plus-tv-analog.c
··· 16 16 Mauro Carvalho Chehab <mchehab@infradead.org> 17 17 */ 18 18 19 - static struct ir_scancode kworld_plus_tv_analog[] = { 19 + static struct rc_map_table kworld_plus_tv_analog[] = { 20 20 { 0x0c, KEY_PROG1 }, /* Kworld key */ 21 21 { 0x16, KEY_CLOSECD }, /* -> ) */ 22 22 { 0x1d, KEY_POWER2 },
+1 -1
drivers/media/rc/keymaps/rc-leadtek-y04g0051.c
··· 20 20 21 21 #include <media/rc-map.h> 22 22 23 - static struct ir_scancode leadtek_y04g0051[] = { 23 + static struct rc_map_table leadtek_y04g0051[] = { 24 24 { 0x0300, KEY_POWER2 }, 25 25 { 0x0303, KEY_SCREEN }, 26 26 { 0x0304, KEY_RIGHT },
+1 -1
drivers/media/rc/keymaps/rc-lirc.c
··· 11 11 12 12 #include <media/rc-core.h> 13 13 14 - static struct ir_scancode lirc[] = { 14 + static struct rc_map_table lirc[] = { 15 15 { }, 16 16 }; 17 17
+1 -1
drivers/media/rc/keymaps/rc-lme2510.c
··· 12 12 #include <media/rc-map.h> 13 13 14 14 15 - static struct ir_scancode lme2510_rc[] = { 15 + static struct rc_map_table lme2510_rc[] = { 16 16 { 0xba45, KEY_0 }, 17 17 { 0xa05f, KEY_1 }, 18 18 { 0xaf50, KEY_2 },
+1 -1
drivers/media/rc/keymaps/rc-manli.c
··· 21 21 helps to descide which keycodes to assign to the buttons. 22 22 */ 23 23 24 - static struct ir_scancode manli[] = { 24 + static struct rc_map_table manli[] = { 25 25 26 26 /* 0x1c 0x12 * 27 27 * FUNCTION POWER *
+1 -1
drivers/media/rc/keymaps/rc-msi-digivox-ii.c
··· 20 20 21 21 #include <media/rc-map.h> 22 22 23 - static struct ir_scancode msi_digivox_ii[] = { 23 + static struct rc_map_table msi_digivox_ii[] = { 24 24 { 0x0002, KEY_2 }, 25 25 { 0x0003, KEY_UP }, /* up */ 26 26 { 0x0004, KEY_3 },
+1 -1
drivers/media/rc/keymaps/rc-msi-digivox-iii.c
··· 24 24 /* Uses NEC extended 0x61d6. */ 25 25 /* This remote seems to be same as rc-kworld-315u.c. Anyhow, add new remote 26 26 since rc-kworld-315u.c lacks NEC extended address byte. */ 27 - static struct ir_scancode msi_digivox_iii[] = { 27 + static struct rc_map_table msi_digivox_iii[] = { 28 28 { 0x61d601, KEY_VIDEO }, /* Source */ 29 29 { 0x61d602, KEY_3 }, 30 30 { 0x61d603, KEY_POWER }, /* ShutDown */
+1 -1
drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c
··· 26 26 Some changes to formatting and keycodes by Mark Schultz <n9xmj@yahoo.com> 27 27 */ 28 28 29 - static struct ir_scancode msi_tvanywhere_plus[] = { 29 + static struct rc_map_table msi_tvanywhere_plus[] = { 30 30 31 31 /* ---- Remote Button Layout ---- 32 32
+1 -1
drivers/media/rc/keymaps/rc-msi-tvanywhere.c
··· 14 14 15 15 /* MSI TV@nywhere MASTER remote */ 16 16 17 - static struct ir_scancode msi_tvanywhere[] = { 17 + static struct rc_map_table msi_tvanywhere[] = { 18 18 /* Keys 0 to 9 */ 19 19 { 0x00, KEY_0 }, 20 20 { 0x01, KEY_1 },
+1 -1
drivers/media/rc/keymaps/rc-nebula.c
··· 12 12 13 13 #include <media/rc-map.h> 14 14 15 - static struct ir_scancode nebula[] = { 15 + static struct rc_map_table nebula[] = { 16 16 { 0x00, KEY_0 }, 17 17 { 0x01, KEY_1 }, 18 18 { 0x02, KEY_2 },
+1 -1
drivers/media/rc/keymaps/rc-nec-terratec-cinergy-xs.c
··· 16 16 Mauro Carvalho Chehab <mchehab@redhat.com> 17 17 */ 18 18 19 - static struct ir_scancode nec_terratec_cinergy_xs[] = { 19 + static struct rc_map_table nec_terratec_cinergy_xs[] = { 20 20 { 0x1441, KEY_HOME}, 21 21 { 0x1401, KEY_POWER2}, 22 22
+1 -1
drivers/media/rc/keymaps/rc-norwood.c
··· 16 16 By Peter Naulls <peter@chocky.org> 17 17 Key comments are the functions given in the manual */ 18 18 19 - static struct ir_scancode norwood[] = { 19 + static struct rc_map_table norwood[] = { 20 20 /* Keys 0 to 9 */ 21 21 { 0x20, KEY_0 }, 22 22 { 0x21, KEY_1 },
+1 -1
drivers/media/rc/keymaps/rc-npgtech.c
··· 12 12 13 13 #include <media/rc-map.h> 14 14 15 - static struct ir_scancode npgtech[] = { 15 + static struct rc_map_table npgtech[] = { 16 16 { 0x1d, KEY_SWITCHVIDEOMODE }, /* switch inputs */ 17 17 { 0x2a, KEY_FRONT }, 18 18
+1 -1
drivers/media/rc/keymaps/rc-pctv-sedna.c
··· 17 17 Pavel Mihaylov <bin@bash.info> 18 18 Also for the remote bundled with Kozumi KTV-01C card */ 19 19 20 - static struct ir_scancode pctv_sedna[] = { 20 + static struct rc_map_table pctv_sedna[] = { 21 21 { 0x00, KEY_0 }, 22 22 { 0x01, KEY_1 }, 23 23 { 0x02, KEY_2 },
+1 -1
drivers/media/rc/keymaps/rc-pinnacle-color.c
··· 12 12 13 13 #include <media/rc-map.h> 14 14 15 - static struct ir_scancode pinnacle_color[] = { 15 + static struct rc_map_table pinnacle_color[] = { 16 16 { 0x59, KEY_MUTE }, 17 17 { 0x4a, KEY_POWER }, 18 18
+1 -1
drivers/media/rc/keymaps/rc-pinnacle-grey.c
··· 12 12 13 13 #include <media/rc-map.h> 14 14 15 - static struct ir_scancode pinnacle_grey[] = { 15 + static struct rc_map_table pinnacle_grey[] = { 16 16 { 0x3a, KEY_0 }, 17 17 { 0x31, KEY_1 }, 18 18 { 0x32, KEY_2 },
+1 -1
drivers/media/rc/keymaps/rc-pinnacle-pctv-hd.c
··· 14 14 15 15 /* Pinnacle PCTV HD 800i mini remote */ 16 16 17 - static struct ir_scancode pinnacle_pctv_hd[] = { 17 + static struct rc_map_table pinnacle_pctv_hd[] = { 18 18 19 19 { 0x0f, KEY_1 }, 20 20 { 0x15, KEY_2 },
+1 -1
drivers/media/rc/keymaps/rc-pixelview-mk12.c
··· 16 16 * Keytable for MK-F12 IR remote provided together with Pixelview 17 17 * Ultra Pro Remote Controller. Uses NEC extended format. 18 18 */ 19 - static struct ir_scancode pixelview_mk12[] = { 19 + static struct rc_map_table pixelview_mk12[] = { 20 20 { 0x866b03, KEY_TUNER }, /* Timeshift */ 21 21 { 0x866b1e, KEY_POWER2 }, /* power */ 22 22
+1 -1
drivers/media/rc/keymaps/rc-pixelview-new.c
··· 17 17 present on PV MPEG 8000GT 18 18 */ 19 19 20 - static struct ir_scancode pixelview_new[] = { 20 + static struct rc_map_table pixelview_new[] = { 21 21 { 0x3c, KEY_TIME }, /* Timeshift */ 22 22 { 0x12, KEY_POWER }, 23 23
+1 -1
drivers/media/rc/keymaps/rc-pixelview.c
··· 12 12 13 13 #include <media/rc-map.h> 14 14 15 - static struct ir_scancode pixelview[] = { 15 + static struct rc_map_table pixelview[] = { 16 16 17 17 { 0x1e, KEY_POWER }, /* power */ 18 18 { 0x07, KEY_MEDIA }, /* source */
+1 -1
drivers/media/rc/keymaps/rc-powercolor-real-angel.c
··· 17 17 * Daniel Fraga <fragabr@gmail.com> 18 18 */ 19 19 20 - static struct ir_scancode powercolor_real_angel[] = { 20 + static struct rc_map_table powercolor_real_angel[] = { 21 21 { 0x38, KEY_SWITCHVIDEOMODE }, /* switch inputs */ 22 22 { 0x0c, KEY_MEDIA }, /* Turn ON/OFF App */ 23 23 { 0x00, KEY_0 },
+1 -1
drivers/media/rc/keymaps/rc-proteus-2309.c
··· 14 14 15 15 /* Michal Majchrowicz <mmajchrowicz@gmail.com> */ 16 16 17 - static struct ir_scancode proteus_2309[] = { 17 + static struct rc_map_table proteus_2309[] = { 18 18 /* numeric */ 19 19 { 0x00, KEY_0 }, 20 20 { 0x01, KEY_1 },
+1 -1
drivers/media/rc/keymaps/rc-purpletv.c
··· 12 12 13 13 #include <media/rc-map.h> 14 14 15 - static struct ir_scancode purpletv[] = { 15 + static struct rc_map_table purpletv[] = { 16 16 { 0x03, KEY_POWER }, 17 17 { 0x6f, KEY_MUTE }, 18 18 { 0x10, KEY_BACKSPACE }, /* Recall */
+1 -1
drivers/media/rc/keymaps/rc-pv951.c
··· 14 14 15 15 /* Mark Phalan <phalanm@o2.ie> */ 16 16 17 - static struct ir_scancode pv951[] = { 17 + static struct rc_map_table pv951[] = { 18 18 { 0x00, KEY_0 }, 19 19 { 0x01, KEY_1 }, 20 20 { 0x02, KEY_2 },
+1 -1
drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
··· 19 19 * This table contains the complete RC5 code, instead of just the data part 20 20 */ 21 21 22 - static struct ir_scancode rc5_hauppauge_new[] = { 22 + static struct rc_map_table rc5_hauppauge_new[] = { 23 23 /* Keys 0 to 9 */ 24 24 { 0x1e00, KEY_0 }, 25 25 { 0x1e01, KEY_1 },
+1 -1
drivers/media/rc/keymaps/rc-rc5-tv.c
··· 16 16 /* see http://users.pandora.be/nenya/electronics/rc5/codes00.htm */ 17 17 /* used by old (black) Hauppauge remotes */ 18 18 19 - static struct ir_scancode rc5_tv[] = { 19 + static struct rc_map_table rc5_tv[] = { 20 20 /* Keys 0 to 9 */ 21 21 { 0x00, KEY_0 }, 22 22 { 0x01, KEY_1 },
+1 -1
drivers/media/rc/keymaps/rc-rc6-mce.c
··· 11 11 12 12 #include <media/rc-map.h> 13 13 14 - static struct ir_scancode rc6_mce[] = { 14 + static struct rc_map_table rc6_mce[] = { 15 15 16 16 { 0x800f0400, KEY_NUMERIC_0 }, 17 17 { 0x800f0401, KEY_NUMERIC_1 },
+1 -1
drivers/media/rc/keymaps/rc-real-audio-220-32-keys.c
··· 14 14 15 15 /* Zogis Real Audio 220 - 32 keys IR */ 16 16 17 - static struct ir_scancode real_audio_220_32_keys[] = { 17 + static struct rc_map_table real_audio_220_32_keys[] = { 18 18 { 0x1c, KEY_RADIO}, 19 19 { 0x12, KEY_POWER2}, 20 20
+1 -1
drivers/media/rc/keymaps/rc-streamzap.c
··· 11 11 12 12 #include <media/rc-map.h> 13 13 14 - static struct ir_scancode streamzap[] = { 14 + static struct rc_map_table streamzap[] = { 15 15 /* 16 16 * The Streamzap remote is almost, but not quite, RC-5, as it has an extra 17 17 * bit in it, which throws the in-kernel RC-5 decoder for a loop. Currently,
+1 -1
drivers/media/rc/keymaps/rc-tbs-nec.c
··· 12 12 13 13 #include <media/rc-map.h> 14 14 15 - static struct ir_scancode tbs_nec[] = { 15 + static struct rc_map_table tbs_nec[] = { 16 16 { 0x04, KEY_POWER2}, /*power*/ 17 17 { 0x14, KEY_MUTE}, /*mute*/ 18 18 { 0x07, KEY_1},
+1 -1
drivers/media/rc/keymaps/rc-terratec-cinergy-xs.c
··· 16 16 Devin Heitmueller <dheitmueller@linuxtv.org> 17 17 */ 18 18 19 - static struct ir_scancode terratec_cinergy_xs[] = { 19 + static struct rc_map_table terratec_cinergy_xs[] = { 20 20 { 0x41, KEY_HOME}, 21 21 { 0x01, KEY_POWER}, 22 22 { 0x42, KEY_MENU},
+1 -1
drivers/media/rc/keymaps/rc-terratec-slim.c
··· 22 22 23 23 /* TerraTec slim remote, 7 rows, 4 columns. */ 24 24 /* Uses NEC extended 0x02bd. */ 25 - static struct ir_scancode terratec_slim[] = { 25 + static struct rc_map_table terratec_slim[] = { 26 26 { 0x02bd00, KEY_1 }, 27 27 { 0x02bd01, KEY_2 }, 28 28 { 0x02bd02, KEY_3 },
+1 -1
drivers/media/rc/keymaps/rc-tevii-nec.c
··· 12 12 13 13 #include <media/rc-map.h> 14 14 15 - static struct ir_scancode tevii_nec[] = { 15 + static struct rc_map_table tevii_nec[] = { 16 16 { 0x0a, KEY_POWER2}, 17 17 { 0x0c, KEY_MUTE}, 18 18 { 0x11, KEY_1},
+1 -1
drivers/media/rc/keymaps/rc-total-media-in-hand.c
··· 21 21 #include <media/rc-map.h> 22 22 23 23 /* Uses NEC extended 0x02bd */ 24 - static struct ir_scancode total_media_in_hand[] = { 24 + static struct rc_map_table total_media_in_hand[] = { 25 25 { 0x02bd00, KEY_1 }, 26 26 { 0x02bd01, KEY_2 }, 27 27 { 0x02bd02, KEY_3 },
+1 -1
drivers/media/rc/keymaps/rc-trekstor.c
··· 23 23 /* TrekStor DVB-T USB Stick remote controller. */ 24 24 /* Imported from af9015.h. 25 25 Initial keytable was from Marc Schneider <macke@macke.org> */ 26 - static struct ir_scancode trekstor[] = { 26 + static struct rc_map_table trekstor[] = { 27 27 { 0x0084, KEY_0 }, 28 28 { 0x0085, KEY_MUTE }, /* Mute */ 29 29 { 0x0086, KEY_HOMEPAGE }, /* Home */
+1 -1
drivers/media/rc/keymaps/rc-tt-1500.c
··· 14 14 15 15 /* for the Technotrend 1500 bundled remotes (grey and black): */ 16 16 17 - static struct ir_scancode tt_1500[] = { 17 + static struct rc_map_table tt_1500[] = { 18 18 { 0x01, KEY_POWER }, 19 19 { 0x02, KEY_SHUFFLE }, /* ? double-arrow key */ 20 20 { 0x03, KEY_1 },
+1 -1
drivers/media/rc/keymaps/rc-twinhan1027.c
··· 1 1 #include <media/rc-map.h> 2 2 3 - static struct ir_scancode twinhan_vp1027[] = { 3 + static struct rc_map_table twinhan_vp1027[] = { 4 4 { 0x16, KEY_POWER2 }, 5 5 { 0x17, KEY_FAVORITES }, 6 6 { 0x0f, KEY_TEXT },
+1 -1
drivers/media/rc/keymaps/rc-videomate-s350.c
··· 12 12 13 13 #include <media/rc-map.h> 14 14 15 - static struct ir_scancode videomate_s350[] = { 15 + static struct rc_map_table videomate_s350[] = { 16 16 { 0x00, KEY_TV}, 17 17 { 0x01, KEY_DVD}, 18 18 { 0x04, KEY_RECORD},
+1 -1
drivers/media/rc/keymaps/rc-videomate-tv-pvr.c
··· 12 12 13 13 #include <media/rc-map.h> 14 14 15 - static struct ir_scancode videomate_tv_pvr[] = { 15 + static struct rc_map_table videomate_tv_pvr[] = { 16 16 { 0x14, KEY_MUTE }, 17 17 { 0x24, KEY_ZOOM }, 18 18
+1 -1
drivers/media/rc/keymaps/rc-winfast-usbii-deluxe.c
··· 16 16 Magnus Alm <magnus.alm@gmail.com> 17 17 */ 18 18 19 - static struct ir_scancode winfast_usbii_deluxe[] = { 19 + static struct rc_map_table winfast_usbii_deluxe[] = { 20 20 { 0x62, KEY_0}, 21 21 { 0x75, KEY_1}, 22 22 { 0x76, KEY_2},
+1 -1
drivers/media/rc/keymaps/rc-winfast.c
··· 14 14 15 15 /* Table for Leadtek Winfast Remote Controls - used by both bttv and cx88 */ 16 16 17 - static struct ir_scancode winfast[] = { 17 + static struct rc_map_table winfast[] = { 18 18 /* Keys 0 to 9 */ 19 19 { 0x12, KEY_0 }, 20 20 { 0x05, KEY_1 },
+10 -10
drivers/media/rc/rc-main.c
··· 94 94 EXPORT_SYMBOL_GPL(ir_unregister_map); 95 95 96 96 97 - static struct ir_scancode empty[] = { 97 + static struct rc_map_table empty[] = { 98 98 { 0x2a, KEY_COFFEE }, 99 99 }; 100 100 ··· 123 123 { 124 124 rc_map->name = name; 125 125 rc_map->rc_type = rc_type; 126 - rc_map->alloc = roundup_pow_of_two(size * sizeof(struct ir_scancode)); 127 - rc_map->size = rc_map->alloc / sizeof(struct ir_scancode); 126 + rc_map->alloc = roundup_pow_of_two(size * sizeof(struct rc_map_table)); 127 + rc_map->size = rc_map->alloc / sizeof(struct rc_map_table); 128 128 rc_map->scan = kmalloc(rc_map->alloc, GFP_KERNEL); 129 129 if (!rc_map->scan) 130 130 return -ENOMEM; ··· 161 161 { 162 162 unsigned int oldalloc = rc_map->alloc; 163 163 unsigned int newalloc = oldalloc; 164 - struct ir_scancode *oldscan = rc_map->scan; 165 - struct ir_scancode *newscan; 164 + struct rc_map_table *oldscan = rc_map->scan; 165 + struct rc_map_table *newscan; 166 166 167 167 if (rc_map->size == rc_map->len) { 168 168 /* All entries in use -> grow keytable */ ··· 188 188 return -ENOMEM; 189 189 } 190 190 191 - memcpy(newscan, rc_map->scan, rc_map->len * sizeof(struct ir_scancode)); 191 + memcpy(newscan, rc_map->scan, rc_map->len * sizeof(struct rc_map_table)); 192 192 rc_map->scan = newscan; 193 193 rc_map->alloc = newalloc; 194 - rc_map->size = rc_map->alloc / sizeof(struct ir_scancode); 194 + rc_map->size = rc_map->alloc / sizeof(struct rc_map_table); 195 195 kfree(oldscan); 196 196 return 0; 197 197 } ··· 221 221 index, rc_map->scan[index].scancode); 222 222 rc_map->len--; 223 223 memmove(&rc_map->scan[index], &rc_map->scan[index+ 1], 224 - (rc_map->len - index) * sizeof(struct ir_scancode)); 224 + (rc_map->len - index) * sizeof(struct rc_map_table)); 225 225 } else { 226 226 IR_dprintk(1, "#%d: %s scan 0x%04x with key 0x%04x\n", 227 227 index, ··· 300 300 /* i is the proper index to insert our new keycode */ 301 301 if (i < rc_map->len) 302 302 memmove(&rc_map->scan[i + 1], &rc_map->scan[i], 303 - (rc_map->len - i) * sizeof(struct ir_scancode)); 303 + (rc_map->len - i) * sizeof(struct rc_map_table)); 304 304 rc_map->scan[i].scancode = scancode; 305 305 rc_map->scan[i].keycode = KEY_RESERVED; 306 306 rc_map->len++; ··· 440 440 { 441 441 struct rc_dev *rdev = input_get_drvdata(idev); 442 442 struct rc_map *rc_map = &rdev->rc_map; 443 - struct ir_scancode *entry; 443 + struct rc_map_table *entry; 444 444 unsigned long flags; 445 445 unsigned int index; 446 446 unsigned int scancode;
+2 -2
include/media/rc-map.h
··· 25 25 RC_TYPE_JVC | RC_TYPE_SONY | RC_TYPE_LIRC | \ 26 26 RC_TYPE_RC5_SZ | RC_TYPE_OTHER) 27 27 28 - struct ir_scancode { 28 + struct rc_map_table { 29 29 u32 scancode; 30 30 u32 keycode; 31 31 }; 32 32 33 33 struct rc_map { 34 - struct ir_scancode *scan; 34 + struct rc_map_table *scan; 35 35 unsigned int size; /* Max number of entries */ 36 36 unsigned int len; /* Used number of entries */ 37 37 unsigned int alloc; /* Size of *scan in bytes */