aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/cxusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/dvb-usb/cxusb.c')
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c62
1 files changed, 31 insertions, 31 deletions
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