diff options
21 files changed, 396 insertions, 282 deletions
diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a800.c index 55803830f6b9..a5c363727133 100644 --- a/drivers/media/dvb/dvb-usb/a800.c +++ b/drivers/media/dvb/dvb-usb/a800.c | |||
@@ -146,10 +146,12 @@ static struct dvb_usb_device_properties a800_properties = { | |||
146 | .power_ctrl = a800_power_ctrl, | 146 | .power_ctrl = a800_power_ctrl, |
147 | .identify_state = a800_identify_state, | 147 | .identify_state = a800_identify_state, |
148 | 148 | ||
149 | .rc_interval = DEFAULT_RC_INTERVAL, | 149 | .rc.legacy = { |
150 | .rc_key_map = ir_codes_a800_table, | 150 | .rc_interval = DEFAULT_RC_INTERVAL, |
151 | .rc_key_map_size = ARRAY_SIZE(ir_codes_a800_table), | 151 | .rc_key_map = ir_codes_a800_table, |
152 | .rc_query = a800_rc_query, | 152 | .rc_key_map_size = ARRAY_SIZE(ir_codes_a800_table), |
153 | .rc_query = a800_rc_query, | ||
154 | }, | ||
153 | 155 | ||
154 | .i2c_algo = &dibusb_i2c_algo, | 156 | .i2c_algo = &dibusb_i2c_algo, |
155 | 157 | ||
diff --git a/drivers/media/dvb/dvb-usb/af9005.c b/drivers/media/dvb/dvb-usb/af9005.c index 985646316591..8ecba8848bcf 100644 --- a/drivers/media/dvb/dvb-usb/af9005.c +++ b/drivers/media/dvb/dvb-usb/af9005.c | |||
@@ -1025,10 +1025,12 @@ static struct dvb_usb_device_properties af9005_properties = { | |||
1025 | 1025 | ||
1026 | .i2c_algo = &af9005_i2c_algo, | 1026 | .i2c_algo = &af9005_i2c_algo, |
1027 | 1027 | ||
1028 | .rc_interval = 200, | 1028 | .rc.legacy = { |
1029 | .rc_key_map = NULL, | 1029 | .rc_interval = 200, |
1030 | .rc_key_map_size = 0, | 1030 | .rc_key_map = NULL, |
1031 | .rc_query = af9005_rc_query, | 1031 | .rc_key_map_size = 0, |
1032 | .rc_query = af9005_rc_query, | ||
1033 | }, | ||
1032 | 1034 | ||
1033 | .generic_bulk_ctrl_endpoint = 2, | 1035 | .generic_bulk_ctrl_endpoint = 2, |
1034 | .generic_bulk_ctrl_endpoint_response = 1, | 1036 | .generic_bulk_ctrl_endpoint_response = 1, |
@@ -1072,10 +1074,10 @@ static int __init af9005_usb_module_init(void) | |||
1072 | rc_keys_size = symbol_request(ir_codes_af9005_table_size); | 1074 | rc_keys_size = symbol_request(ir_codes_af9005_table_size); |
1073 | if (rc_decode == NULL || rc_keys == NULL || rc_keys_size == NULL) { | 1075 | if (rc_decode == NULL || rc_keys == NULL || rc_keys_size == NULL) { |
1074 | err("af9005_rc_decode function not found, disabling remote"); | 1076 | err("af9005_rc_decode function not found, disabling remote"); |
1075 | af9005_properties.rc_query = NULL; | 1077 | af9005_properties.rc.legacy.rc_query = NULL; |
1076 | } else { | 1078 | } else { |
1077 | af9005_properties.rc_key_map = rc_keys; | 1079 | af9005_properties.rc.legacy.rc_key_map = rc_keys; |
1078 | af9005_properties.rc_key_map_size = *rc_keys_size; | 1080 | af9005_properties.rc.legacy.rc_key_map_size = *rc_keys_size; |
1079 | } | 1081 | } |
1080 | 1082 | ||
1081 | return 0; | 1083 | return 0; |
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index c63134cf2069..ea1ed3b4592a 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c | |||
@@ -847,8 +847,8 @@ static void af9015_set_remote_config(struct usb_device *udev, | |||
847 | } | 847 | } |
848 | 848 | ||
849 | if (table) { | 849 | if (table) { |
850 | props->rc_key_map = table->rc_key_map; | 850 | props->rc.legacy.rc_key_map = table->rc_key_map; |
851 | props->rc_key_map_size = table->rc_key_map_size; | 851 | props->rc.legacy.rc_key_map_size = table->rc_key_map_size; |
852 | af9015_config.ir_table = table->ir_table; | 852 | af9015_config.ir_table = table->ir_table; |
853 | af9015_config.ir_table_size = table->ir_table_size; | 853 | af9015_config.ir_table_size = table->ir_table_size; |
854 | } | 854 | } |
@@ -878,8 +878,8 @@ static int af9015_read_config(struct usb_device *udev) | |||
878 | deb_info("%s: IR mode:%d\n", __func__, val); | 878 | deb_info("%s: IR mode:%d\n", __func__, val); |
879 | for (i = 0; i < af9015_properties_count; i++) { | 879 | for (i = 0; i < af9015_properties_count; i++) { |
880 | if (val == AF9015_IR_MODE_DISABLED) { | 880 | if (val == AF9015_IR_MODE_DISABLED) { |
881 | af9015_properties[i].rc_key_map = NULL; | 881 | af9015_properties[i].rc.legacy.rc_key_map = NULL; |
882 | af9015_properties[i].rc_key_map_size = 0; | 882 | af9015_properties[i].rc.legacy.rc_key_map_size = 0; |
883 | } else | 883 | } else |
884 | af9015_set_remote_config(udev, &af9015_properties[i]); | 884 | af9015_set_remote_config(udev, &af9015_properties[i]); |
885 | } | 885 | } |
@@ -1063,7 +1063,7 @@ static int af9015_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
1063 | { | 1063 | { |
1064 | u8 buf[8]; | 1064 | u8 buf[8]; |
1065 | struct req_t req = {GET_IR_CODE, 0, 0, 0, 0, sizeof(buf), buf}; | 1065 | struct req_t req = {GET_IR_CODE, 0, 0, 0, 0, sizeof(buf), buf}; |
1066 | struct ir_scancode *keymap = d->props.rc_key_map; | 1066 | struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; |
1067 | int i, ret; | 1067 | int i, ret; |
1068 | 1068 | ||
1069 | memset(buf, 0, sizeof(buf)); | 1069 | memset(buf, 0, sizeof(buf)); |
@@ -1075,7 +1075,7 @@ static int af9015_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
1075 | *event = 0; | 1075 | *event = 0; |
1076 | *state = REMOTE_NO_KEY_PRESSED; | 1076 | *state = REMOTE_NO_KEY_PRESSED; |
1077 | 1077 | ||
1078 | for (i = 0; i < d->props.rc_key_map_size; i++) { | 1078 | for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { |
1079 | if (!buf[1] && rc5_custom(&keymap[i]) == buf[0] && | 1079 | if (!buf[1] && rc5_custom(&keymap[i]) == buf[0] && |
1080 | rc5_data(&keymap[i]) == buf[2]) { | 1080 | rc5_data(&keymap[i]) == buf[2]) { |
1081 | *event = keymap[i].keycode; | 1081 | *event = keymap[i].keycode; |
@@ -1354,8 +1354,10 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1354 | 1354 | ||
1355 | .identify_state = af9015_identify_state, | 1355 | .identify_state = af9015_identify_state, |
1356 | 1356 | ||
1357 | .rc_query = af9015_rc_query, | 1357 | .rc.legacy = { |
1358 | .rc_interval = 150, | 1358 | .rc_query = af9015_rc_query, |
1359 | .rc_interval = 150, | ||
1360 | }, | ||
1359 | 1361 | ||
1360 | .i2c_algo = &af9015_i2c_algo, | 1362 | .i2c_algo = &af9015_i2c_algo, |
1361 | 1363 | ||
@@ -1461,8 +1463,10 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1461 | 1463 | ||
1462 | .identify_state = af9015_identify_state, | 1464 | .identify_state = af9015_identify_state, |
1463 | 1465 | ||
1464 | .rc_query = af9015_rc_query, | 1466 | .rc.legacy = { |
1465 | .rc_interval = 150, | 1467 | .rc_query = af9015_rc_query, |
1468 | .rc_interval = 150, | ||
1469 | }, | ||
1466 | 1470 | ||
1467 | .i2c_algo = &af9015_i2c_algo, | 1471 | .i2c_algo = &af9015_i2c_algo, |
1468 | 1472 | ||
@@ -1568,8 +1572,10 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1568 | 1572 | ||
1569 | .identify_state = af9015_identify_state, | 1573 | .identify_state = af9015_identify_state, |
1570 | 1574 | ||
1571 | .rc_query = af9015_rc_query, | 1575 | .rc.legacy = { |
1572 | .rc_interval = 150, | 1576 | .rc_query = af9015_rc_query, |
1577 | .rc_interval = 150, | ||
1578 | }, | ||
1573 | 1579 | ||
1574 | .i2c_algo = &af9015_i2c_algo, | 1580 | .i2c_algo = &af9015_i2c_algo, |
1575 | 1581 | ||
diff --git a/drivers/media/dvb/dvb-usb/anysee.c b/drivers/media/dvb/dvb-usb/anysee.c index 3e39e8ff7e8f..4685259e1614 100644 --- a/drivers/media/dvb/dvb-usb/anysee.c +++ b/drivers/media/dvb/dvb-usb/anysee.c | |||
@@ -377,7 +377,7 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap) | |||
377 | static int anysee_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | 377 | static int anysee_rc_query(struct dvb_usb_device *d, u32 *event, int *state) |
378 | { | 378 | { |
379 | u8 buf[] = {CMD_GET_IR_CODE}; | 379 | u8 buf[] = {CMD_GET_IR_CODE}; |
380 | struct ir_scancode *keymap = d->props.rc_key_map; | 380 | struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; |
381 | u8 ircode[2]; | 381 | u8 ircode[2]; |
382 | int i, ret; | 382 | int i, ret; |
383 | 383 | ||
@@ -388,7 +388,7 @@ static int anysee_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
388 | *event = 0; | 388 | *event = 0; |
389 | *state = REMOTE_NO_KEY_PRESSED; | 389 | *state = REMOTE_NO_KEY_PRESSED; |
390 | 390 | ||
391 | for (i = 0; i < d->props.rc_key_map_size; i++) { | 391 | for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { |
392 | if (rc5_custom(&keymap[i]) == ircode[0] && | 392 | if (rc5_custom(&keymap[i]) == ircode[0] && |
393 | rc5_data(&keymap[i]) == ircode[1]) { | 393 | rc5_data(&keymap[i]) == ircode[1]) { |
394 | *event = keymap[i].keycode; | 394 | *event = keymap[i].keycode; |
@@ -520,10 +520,12 @@ static struct dvb_usb_device_properties anysee_properties = { | |||
520 | } | 520 | } |
521 | }, | 521 | }, |
522 | 522 | ||
523 | .rc_key_map = ir_codes_anysee_table, | 523 | .rc.legacy = { |
524 | .rc_key_map_size = ARRAY_SIZE(ir_codes_anysee_table), | 524 | .rc_key_map = ir_codes_anysee_table, |
525 | .rc_query = anysee_rc_query, | 525 | .rc_key_map_size = ARRAY_SIZE(ir_codes_anysee_table), |
526 | .rc_interval = 200, /* windows driver uses 500ms */ | 526 | .rc_query = anysee_rc_query, |
527 | .rc_interval = 200, /* windows driver uses 500ms */ | ||
528 | }, | ||
527 | 529 | ||
528 | .i2c_algo = &anysee_i2c_algo, | 530 | .i2c_algo = &anysee_i2c_algo, |
529 | 531 | ||
diff --git a/drivers/media/dvb/dvb-usb/az6027.c b/drivers/media/dvb/dvb-usb/az6027.c index 03d9bfeb233e..62c58288469f 100644 --- a/drivers/media/dvb/dvb-usb/az6027.c +++ b/drivers/media/dvb/dvb-usb/az6027.c | |||
@@ -1125,10 +1125,13 @@ static struct dvb_usb_device_properties az6027_properties = { | |||
1125 | .power_ctrl = az6027_power_ctrl, | 1125 | .power_ctrl = az6027_power_ctrl, |
1126 | .read_mac_address = az6027_read_mac_addr, | 1126 | .read_mac_address = az6027_read_mac_addr, |
1127 | */ | 1127 | */ |
1128 | .rc_key_map = ir_codes_az6027_table, | 1128 | .rc.legacy = { |
1129 | .rc_key_map_size = ARRAY_SIZE(ir_codes_az6027_table), | 1129 | .rc_key_map = ir_codes_az6027_table, |
1130 | .rc_interval = 400, | 1130 | .rc_key_map_size = ARRAY_SIZE(ir_codes_az6027_table), |
1131 | .rc_query = az6027_rc_query, | 1131 | .rc_interval = 400, |
1132 | .rc_query = az6027_rc_query, | ||
1133 | }, | ||
1134 | |||
1132 | .i2c_algo = &az6027_i2c_algo, | 1135 | .i2c_algo = &az6027_i2c_algo, |
1133 | 1136 | ||
1134 | .num_device_descs = 5, | 1137 | .num_device_descs = 5, |
diff --git a/drivers/media/dvb/dvb-usb/cinergyT2-core.c b/drivers/media/dvb/dvb-usb/cinergyT2-core.c index 806d781a9722..4f5aa83fc1fc 100644 --- a/drivers/media/dvb/dvb-usb/cinergyT2-core.c +++ b/drivers/media/dvb/dvb-usb/cinergyT2-core.c | |||
@@ -217,10 +217,12 @@ static struct dvb_usb_device_properties cinergyt2_properties = { | |||
217 | 217 | ||
218 | .power_ctrl = cinergyt2_power_ctrl, | 218 | .power_ctrl = cinergyt2_power_ctrl, |
219 | 219 | ||
220 | .rc_interval = 50, | 220 | .rc.legacy = { |
221 | .rc_key_map = ir_codes_cinergyt2_table, | 221 | .rc_interval = 50, |
222 | .rc_key_map_size = ARRAY_SIZE(ir_codes_cinergyt2_table), | 222 | .rc_key_map = ir_codes_cinergyt2_table, |
223 | .rc_query = cinergyt2_rc_query, | 223 | .rc_key_map_size = ARRAY_SIZE(ir_codes_cinergyt2_table), |
224 | .rc_query = cinergyt2_rc_query, | ||
225 | }, | ||
224 | 226 | ||
225 | .generic_bulk_ctrl_endpoint = 1, | 227 | .generic_bulk_ctrl_endpoint = 1, |
226 | 228 | ||
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c index 22fc0a99f5ad..cd9f362c37b2 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 | ||
386 | static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | 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_key_map; | 388 | struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; |
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_key_map_size; i++) { | 397 | for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { |
398 | if (rc5_custom(&keymap[i]) == ircode[2] && | 398 | if (rc5_custom(&keymap[i]) == ircode[2] && |
399 | rc5_data(&keymap[i]) == ircode[3]) { | 399 | rc5_data(&keymap[i]) == ircode[3]) { |
400 | *event = keymap[i].keycode; | 400 | *event = keymap[i].keycode; |
@@ -410,7 +410,7 @@ static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
410 | static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event, | 410 | static 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_key_map; | 413 | struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; |
414 | u8 ircode[4]; | 414 | u8 ircode[4]; |
415 | int i; | 415 | int i; |
416 | struct i2c_msg msg = { .addr = 0x6b, .flags = I2C_M_RD, | 416 | struct i2c_msg msg = { .addr = 0x6b, .flags = I2C_M_RD, |
@@ -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_key_map_size; i++) { | 425 | for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { |
426 | if (rc5_custom(&keymap[i]) == ircode[1] && | 426 | if (rc5_custom(&keymap[i]) == ircode[1] && |
427 | rc5_data(&keymap[i]) == ircode[2]) { | 427 | rc5_data(&keymap[i]) == ircode[2]) { |
428 | *event = keymap[i].keycode; | 428 | *event = keymap[i].keycode; |
@@ -438,7 +438,7 @@ static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event, | |||
438 | static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event, | 438 | static 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_key_map; | 441 | struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; |
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_key_map_size; i++) { | 451 | for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { |
452 | if (rc5_custom(&keymap[i]) == ircode[0] && | 452 | if (rc5_custom(&keymap[i]) == ircode[0] && |
453 | rc5_data(&keymap[i]) == ircode[1]) { | 453 | rc5_data(&keymap[i]) == ircode[1]) { |
454 | *event = keymap[i].keycode; | 454 | *event = keymap[i].keycode; |
@@ -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_key_map != NULL && i < 5; i++) { | 926 | for (i = 0; adap->dev->props.rc.legacy.rc_key_map != 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) { |
933 | no_IR: | 933 | no_IR: |
934 | adap->dev->props.rc_key_map = NULL; | 934 | adap->dev->props.rc.legacy.rc_key_map = 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 | } |
@@ -1451,10 +1451,12 @@ static struct dvb_usb_device_properties cxusb_bluebird_lgh064f_properties = { | |||
1451 | 1451 | ||
1452 | .i2c_algo = &cxusb_i2c_algo, | 1452 | .i2c_algo = &cxusb_i2c_algo, |
1453 | 1453 | ||
1454 | .rc_interval = 100, | 1454 | .rc.legacy = { |
1455 | .rc_key_map = ir_codes_dvico_portable_table, | 1455 | .rc_interval = 100, |
1456 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), | 1456 | .rc_key_map = ir_codes_dvico_portable_table, |
1457 | .rc_query = cxusb_rc_query, | 1457 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), |
1458 | .rc_query = cxusb_rc_query, | ||
1459 | }, | ||
1458 | 1460 | ||
1459 | .generic_bulk_ctrl_endpoint = 0x01, | 1461 | .generic_bulk_ctrl_endpoint = 0x01, |
1460 | 1462 | ||
@@ -1502,10 +1504,12 @@ static struct dvb_usb_device_properties cxusb_bluebird_dee1601_properties = { | |||
1502 | 1504 | ||
1503 | .i2c_algo = &cxusb_i2c_algo, | 1505 | .i2c_algo = &cxusb_i2c_algo, |
1504 | 1506 | ||
1505 | .rc_interval = 150, | 1507 | .rc.legacy = { |
1506 | .rc_key_map = ir_codes_dvico_mce_table, | 1508 | .rc_interval = 150, |
1507 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table), | 1509 | .rc_key_map = ir_codes_dvico_mce_table, |
1508 | .rc_query = cxusb_rc_query, | 1510 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table), |
1511 | .rc_query = cxusb_rc_query, | ||
1512 | }, | ||
1509 | 1513 | ||
1510 | .generic_bulk_ctrl_endpoint = 0x01, | 1514 | .generic_bulk_ctrl_endpoint = 0x01, |
1511 | 1515 | ||
@@ -1561,10 +1565,12 @@ static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties = { | |||
1561 | 1565 | ||
1562 | .i2c_algo = &cxusb_i2c_algo, | 1566 | .i2c_algo = &cxusb_i2c_algo, |
1563 | 1567 | ||
1564 | .rc_interval = 100, | 1568 | .rc.legacy = { |
1565 | .rc_key_map = ir_codes_dvico_portable_table, | 1569 | .rc_interval = 100, |
1566 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), | 1570 | .rc_key_map = ir_codes_dvico_portable_table, |
1567 | .rc_query = cxusb_rc_query, | 1571 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), |
1572 | .rc_query = cxusb_rc_query, | ||
1573 | }, | ||
1568 | 1574 | ||
1569 | .generic_bulk_ctrl_endpoint = 0x01, | 1575 | .generic_bulk_ctrl_endpoint = 0x01, |
1570 | .num_device_descs = 1, | 1576 | .num_device_descs = 1, |
@@ -1611,10 +1617,12 @@ static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties = { | |||
1611 | 1617 | ||
1612 | .i2c_algo = &cxusb_i2c_algo, | 1618 | .i2c_algo = &cxusb_i2c_algo, |
1613 | 1619 | ||
1614 | .rc_interval = 100, | 1620 | .rc.legacy = { |
1615 | .rc_key_map = ir_codes_dvico_portable_table, | 1621 | .rc_interval = 100, |
1616 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), | 1622 | .rc_key_map = ir_codes_dvico_portable_table, |
1617 | .rc_query = cxusb_rc_query, | 1623 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), |
1624 | .rc_query = cxusb_rc_query, | ||
1625 | }, | ||
1618 | 1626 | ||
1619 | .generic_bulk_ctrl_endpoint = 0x01, | 1627 | .generic_bulk_ctrl_endpoint = 0x01, |
1620 | 1628 | ||
@@ -1660,10 +1668,12 @@ static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties = { | |||
1660 | 1668 | ||
1661 | .generic_bulk_ctrl_endpoint = 0x01, | 1669 | .generic_bulk_ctrl_endpoint = 0x01, |
1662 | 1670 | ||
1663 | .rc_interval = 100, | 1671 | .rc.legacy = { |
1664 | .rc_key_map = ir_codes_dvico_mce_table, | 1672 | .rc_interval = 100, |
1665 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table), | 1673 | .rc_key_map = ir_codes_dvico_mce_table, |
1666 | .rc_query = cxusb_bluebird2_rc_query, | 1674 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table), |
1675 | .rc_query = cxusb_bluebird2_rc_query, | ||
1676 | }, | ||
1667 | 1677 | ||
1668 | .num_device_descs = 1, | 1678 | .num_device_descs = 1, |
1669 | .devices = { | 1679 | .devices = { |
@@ -1708,10 +1718,12 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_properties = { | |||
1708 | 1718 | ||
1709 | .generic_bulk_ctrl_endpoint = 0x01, | 1719 | .generic_bulk_ctrl_endpoint = 0x01, |
1710 | 1720 | ||
1711 | .rc_interval = 100, | 1721 | .rc.legacy = { |
1712 | .rc_key_map = ir_codes_dvico_portable_table, | 1722 | .rc_interval = 100, |
1713 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), | 1723 | .rc_key_map = ir_codes_dvico_portable_table, |
1714 | .rc_query = cxusb_bluebird2_rc_query, | 1724 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), |
1725 | .rc_query = cxusb_bluebird2_rc_query, | ||
1726 | }, | ||
1715 | 1727 | ||
1716 | .num_device_descs = 1, | 1728 | .num_device_descs = 1, |
1717 | .devices = { | 1729 | .devices = { |
@@ -1758,10 +1770,12 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_needsfirmware_prope | |||
1758 | 1770 | ||
1759 | .generic_bulk_ctrl_endpoint = 0x01, | 1771 | .generic_bulk_ctrl_endpoint = 0x01, |
1760 | 1772 | ||
1761 | .rc_interval = 100, | 1773 | .rc.legacy = { |
1762 | .rc_key_map = ir_codes_dvico_portable_table, | 1774 | .rc_interval = 100, |
1763 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), | 1775 | .rc_key_map = ir_codes_dvico_portable_table, |
1764 | .rc_query = cxusb_rc_query, | 1776 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), |
1777 | .rc_query = cxusb_rc_query, | ||
1778 | }, | ||
1765 | 1779 | ||
1766 | .num_device_descs = 1, | 1780 | .num_device_descs = 1, |
1767 | .devices = { | 1781 | .devices = { |
@@ -1849,10 +1863,12 @@ struct dvb_usb_device_properties cxusb_bluebird_dualdig4_rev2_properties = { | |||
1849 | 1863 | ||
1850 | .generic_bulk_ctrl_endpoint = 0x01, | 1864 | .generic_bulk_ctrl_endpoint = 0x01, |
1851 | 1865 | ||
1852 | .rc_interval = 100, | 1866 | .rc.legacy = { |
1853 | .rc_key_map = ir_codes_dvico_mce_table, | 1867 | .rc_interval = 100, |
1854 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table), | 1868 | .rc_key_map = ir_codes_dvico_mce_table, |
1855 | .rc_query = cxusb_rc_query, | 1869 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table), |
1870 | .rc_query = cxusb_rc_query, | ||
1871 | }, | ||
1856 | 1872 | ||
1857 | .num_device_descs = 1, | 1873 | .num_device_descs = 1, |
1858 | .devices = { | 1874 | .devices = { |
@@ -1897,10 +1913,12 @@ static struct dvb_usb_device_properties cxusb_d680_dmb_properties = { | |||
1897 | 1913 | ||
1898 | .generic_bulk_ctrl_endpoint = 0x01, | 1914 | .generic_bulk_ctrl_endpoint = 0x01, |
1899 | 1915 | ||
1900 | .rc_interval = 100, | 1916 | .rc.legacy = { |
1901 | .rc_key_map = ir_codes_d680_dmb_table, | 1917 | .rc_interval = 100, |
1902 | .rc_key_map_size = ARRAY_SIZE(ir_codes_d680_dmb_table), | 1918 | .rc_key_map = ir_codes_d680_dmb_table, |
1903 | .rc_query = cxusb_d680_dmb_rc_query, | 1919 | .rc_key_map_size = ARRAY_SIZE(ir_codes_d680_dmb_table), |
1920 | .rc_query = cxusb_d680_dmb_rc_query, | ||
1921 | }, | ||
1904 | 1922 | ||
1905 | .num_device_descs = 1, | 1923 | .num_device_descs = 1, |
1906 | .devices = { | 1924 | .devices = { |
@@ -1946,10 +1964,12 @@ static struct dvb_usb_device_properties cxusb_mygica_d689_properties = { | |||
1946 | 1964 | ||
1947 | .generic_bulk_ctrl_endpoint = 0x01, | 1965 | .generic_bulk_ctrl_endpoint = 0x01, |
1948 | 1966 | ||
1949 | .rc_interval = 100, | 1967 | .rc.legacy = { |
1950 | .rc_key_map = ir_codes_d680_dmb_table, | 1968 | .rc_interval = 100, |
1951 | .rc_key_map_size = ARRAY_SIZE(ir_codes_d680_dmb_table), | 1969 | .rc_key_map = ir_codes_d680_dmb_table, |
1952 | .rc_query = cxusb_d680_dmb_rc_query, | 1970 | .rc_key_map_size = ARRAY_SIZE(ir_codes_d680_dmb_table), |
1971 | .rc_query = cxusb_d680_dmb_rc_query, | ||
1972 | }, | ||
1953 | 1973 | ||
1954 | .num_device_descs = 1, | 1974 | .num_device_descs = 1, |
1955 | .devices = { | 1975 | .devices = { |
diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c index f761897eef3c..527b1e69df6c 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_core.c +++ b/drivers/media/dvb/dvb-usb/dib0700_core.c | |||
@@ -510,7 +510,7 @@ static void dib0700_rc_urb_completion(struct urb *purb) | |||
510 | return; | 510 | return; |
511 | } | 511 | } |
512 | 512 | ||
513 | keymap = d->props.rc_key_map; | 513 | keymap = d->props.rc.legacy.rc_key_map; |
514 | st = d->priv; | 514 | st = d->priv; |
515 | buf = (u8 *)purb->transfer_buffer; | 515 | buf = (u8 *)purb->transfer_buffer; |
516 | 516 | ||
@@ -571,7 +571,7 @@ static void dib0700_rc_urb_completion(struct urb *purb) | |||
571 | poll_reply.system, poll_reply.data, poll_reply.not_data); | 571 | poll_reply.system, poll_reply.data, poll_reply.not_data); |
572 | 572 | ||
573 | /* Find the key in the map */ | 573 | /* Find the key in the map */ |
574 | for (i = 0; i < d->props.rc_key_map_size; i++) { | 574 | for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { |
575 | if (rc5_custom(&keymap[i]) == (poll_reply.system & 0xff) && | 575 | if (rc5_custom(&keymap[i]) == (poll_reply.system & 0xff) && |
576 | rc5_data(&keymap[i]) == poll_reply.data) { | 576 | rc5_data(&keymap[i]) == poll_reply.data) { |
577 | event = keymap[i].keycode; | 577 | event = keymap[i].keycode; |
@@ -640,7 +640,7 @@ int dib0700_rc_setup(struct dvb_usb_device *d) | |||
640 | int ret; | 640 | int ret; |
641 | int i; | 641 | int i; |
642 | 642 | ||
643 | if (d->props.rc_key_map == NULL) | 643 | if (d->props.rc.legacy.rc_key_map == NULL) |
644 | return 0; | 644 | return 0; |
645 | 645 | ||
646 | /* Set the IR mode */ | 646 | /* Set the IR mode */ |
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index 0c9adbbcedb2..2ae74ba3acbb 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c | |||
@@ -477,7 +477,7 @@ static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
477 | { | 477 | { |
478 | u8 key[4]; | 478 | u8 key[4]; |
479 | int i; | 479 | int i; |
480 | struct ir_scancode *keymap = d->props.rc_key_map; | 480 | struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; |
481 | struct dib0700_state *st = d->priv; | 481 | struct dib0700_state *st = d->priv; |
482 | 482 | ||
483 | *event = 0; | 483 | *event = 0; |
@@ -517,7 +517,7 @@ static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
517 | } | 517 | } |
518 | return 0; | 518 | return 0; |
519 | } | 519 | } |
520 | for (i=0;i<d->props.rc_key_map_size; i++) { | 520 | for (i=0;i<d->props.rc.legacy.rc_key_map_size; i++) { |
521 | if (rc5_custom(&keymap[i]) == key[3-2] && | 521 | if (rc5_custom(&keymap[i]) == key[3-2] && |
522 | rc5_data(&keymap[i]) == key[3-3]) { | 522 | rc5_data(&keymap[i]) == key[3-3]) { |
523 | st->rc_counter = 0; | 523 | st->rc_counter = 0; |
@@ -531,7 +531,7 @@ static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
531 | } | 531 | } |
532 | default: { | 532 | default: { |
533 | /* RC-5 protocol changes toggle bit on new keypress */ | 533 | /* RC-5 protocol changes toggle bit on new keypress */ |
534 | for (i = 0; i < d->props.rc_key_map_size; i++) { | 534 | for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { |
535 | if (rc5_custom(&keymap[i]) == key[3-2] && | 535 | if (rc5_custom(&keymap[i]) == key[3-2] && |
536 | rc5_data(&keymap[i]) == key[3-3]) { | 536 | rc5_data(&keymap[i]) == key[3-3]) { |
537 | if (d->last_event == keymap[i].keycode && | 537 | if (d->last_event == keymap[i].keycode && |
@@ -2168,10 +2168,12 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2168 | } | 2168 | } |
2169 | }, | 2169 | }, |
2170 | 2170 | ||
2171 | .rc_interval = DEFAULT_RC_INTERVAL, | 2171 | .rc.legacy = { |
2172 | .rc_key_map = ir_codes_dib0700_table, | 2172 | .rc_interval = DEFAULT_RC_INTERVAL, |
2173 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), | 2173 | .rc_key_map = ir_codes_dib0700_table, |
2174 | .rc_query = dib0700_rc_query | 2174 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), |
2175 | .rc_query = dib0700_rc_query | ||
2176 | }, | ||
2175 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2177 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2176 | 2178 | ||
2177 | .num_adapters = 2, | 2179 | .num_adapters = 2, |
@@ -2197,10 +2199,12 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2197 | }, | 2199 | }, |
2198 | }, | 2200 | }, |
2199 | 2201 | ||
2200 | .rc_interval = DEFAULT_RC_INTERVAL, | 2202 | .rc.legacy = { |
2201 | .rc_key_map = ir_codes_dib0700_table, | 2203 | .rc_interval = DEFAULT_RC_INTERVAL, |
2202 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), | 2204 | .rc_key_map = ir_codes_dib0700_table, |
2203 | .rc_query = dib0700_rc_query | 2205 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), |
2206 | .rc_query = dib0700_rc_query | ||
2207 | }, | ||
2204 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2208 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2205 | 2209 | ||
2206 | .num_adapters = 2, | 2210 | .num_adapters = 2, |
@@ -2251,11 +2255,12 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2251 | 2255 | ||
2252 | }, | 2256 | }, |
2253 | 2257 | ||
2254 | .rc_interval = DEFAULT_RC_INTERVAL, | 2258 | .rc.legacy = { |
2255 | .rc_key_map = ir_codes_dib0700_table, | 2259 | .rc_interval = DEFAULT_RC_INTERVAL, |
2256 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), | 2260 | .rc_key_map = ir_codes_dib0700_table, |
2257 | .rc_query = dib0700_rc_query | 2261 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), |
2258 | 2262 | .rc_query = dib0700_rc_query | |
2263 | }, | ||
2259 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2264 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2260 | 2265 | ||
2261 | .num_adapters = 1, | 2266 | .num_adapters = 1, |
@@ -2288,10 +2293,12 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2288 | } | 2293 | } |
2289 | }, | 2294 | }, |
2290 | 2295 | ||
2291 | .rc_interval = DEFAULT_RC_INTERVAL, | 2296 | .rc.legacy = { |
2292 | .rc_key_map = ir_codes_dib0700_table, | 2297 | .rc_interval = DEFAULT_RC_INTERVAL, |
2293 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), | 2298 | .rc_key_map = ir_codes_dib0700_table, |
2294 | .rc_query = dib0700_rc_query | 2299 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), |
2300 | .rc_query = dib0700_rc_query | ||
2301 | }, | ||
2295 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2302 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2296 | 2303 | ||
2297 | .num_adapters = 1, | 2304 | .num_adapters = 1, |
@@ -2358,11 +2365,12 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2358 | }, | 2365 | }, |
2359 | }, | 2366 | }, |
2360 | 2367 | ||
2361 | .rc_interval = DEFAULT_RC_INTERVAL, | 2368 | .rc.legacy = { |
2362 | .rc_key_map = ir_codes_dib0700_table, | 2369 | .rc_interval = DEFAULT_RC_INTERVAL, |
2363 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), | 2370 | .rc_key_map = ir_codes_dib0700_table, |
2364 | .rc_query = dib0700_rc_query | 2371 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), |
2365 | 2372 | .rc_query = dib0700_rc_query | |
2373 | }, | ||
2366 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2374 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2367 | 2375 | ||
2368 | .num_adapters = 1, | 2376 | .num_adapters = 1, |
@@ -2397,11 +2405,12 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2397 | }, | 2405 | }, |
2398 | }, | 2406 | }, |
2399 | 2407 | ||
2400 | .rc_interval = DEFAULT_RC_INTERVAL, | 2408 | .rc.legacy = { |
2401 | .rc_key_map = ir_codes_dib0700_table, | 2409 | .rc_interval = DEFAULT_RC_INTERVAL, |
2402 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), | 2410 | .rc_key_map = ir_codes_dib0700_table, |
2403 | .rc_query = dib0700_rc_query | 2411 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), |
2404 | 2412 | .rc_query = dib0700_rc_query | |
2413 | }, | ||
2405 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2414 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2406 | 2415 | ||
2407 | .num_adapters = 2, | 2416 | .num_adapters = 2, |
@@ -2463,10 +2472,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2463 | { NULL }, | 2472 | { NULL }, |
2464 | }, | 2473 | }, |
2465 | }, | 2474 | }, |
2466 | .rc_interval = DEFAULT_RC_INTERVAL, | 2475 | |
2467 | .rc_key_map = ir_codes_dib0700_table, | 2476 | .rc.legacy = { |
2468 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), | 2477 | .rc_interval = DEFAULT_RC_INTERVAL, |
2469 | .rc_query = dib0700_rc_query | 2478 | .rc_key_map = ir_codes_dib0700_table, |
2479 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), | ||
2480 | .rc_query = dib0700_rc_query | ||
2481 | }, | ||
2470 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2482 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2471 | 2483 | ||
2472 | .num_adapters = 1, | 2484 | .num_adapters = 1, |
@@ -2525,10 +2537,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2525 | { NULL }, | 2537 | { NULL }, |
2526 | }, | 2538 | }, |
2527 | }, | 2539 | }, |
2528 | .rc_interval = DEFAULT_RC_INTERVAL, | 2540 | |
2529 | .rc_key_map = ir_codes_dib0700_table, | 2541 | .rc.legacy = { |
2530 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), | 2542 | .rc_interval = DEFAULT_RC_INTERVAL, |
2531 | .rc_query = dib0700_rc_query | 2543 | .rc_key_map = ir_codes_dib0700_table, |
2544 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), | ||
2545 | .rc_query = dib0700_rc_query | ||
2546 | }, | ||
2532 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2547 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2533 | .num_adapters = 1, | 2548 | .num_adapters = 1, |
2534 | .adapter = { | 2549 | .adapter = { |
@@ -2554,10 +2569,12 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2554 | { NULL }, | 2569 | { NULL }, |
2555 | }, | 2570 | }, |
2556 | }, | 2571 | }, |
2557 | .rc_interval = DEFAULT_RC_INTERVAL, | 2572 | .rc.legacy = { |
2558 | .rc_key_map = ir_codes_dib0700_table, | 2573 | .rc_interval = DEFAULT_RC_INTERVAL, |
2559 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), | 2574 | .rc_key_map = ir_codes_dib0700_table, |
2560 | .rc_query = dib0700_rc_query | 2575 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), |
2576 | .rc_query = dib0700_rc_query | ||
2577 | }, | ||
2561 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2578 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2562 | .num_adapters = 1, | 2579 | .num_adapters = 1, |
2563 | .adapter = { | 2580 | .adapter = { |
@@ -2615,10 +2632,12 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2615 | { NULL }, | 2632 | { NULL }, |
2616 | }, | 2633 | }, |
2617 | }, | 2634 | }, |
2618 | .rc_interval = DEFAULT_RC_INTERVAL, | 2635 | .rc.legacy = { |
2619 | .rc_key_map = ir_codes_dib0700_table, | 2636 | .rc_interval = DEFAULT_RC_INTERVAL, |
2620 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), | 2637 | .rc_key_map = ir_codes_dib0700_table, |
2621 | .rc_query = dib0700_rc_query | 2638 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), |
2639 | .rc_query = dib0700_rc_query | ||
2640 | }, | ||
2622 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2641 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2623 | .num_adapters = 1, | 2642 | .num_adapters = 1, |
2624 | .adapter = { | 2643 | .adapter = { |
@@ -2653,11 +2672,12 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2653 | }, | 2672 | }, |
2654 | }, | 2673 | }, |
2655 | 2674 | ||
2656 | .rc_interval = DEFAULT_RC_INTERVAL, | 2675 | .rc.legacy = { |
2657 | .rc_key_map = ir_codes_dib0700_table, | 2676 | .rc_interval = DEFAULT_RC_INTERVAL, |
2658 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), | 2677 | .rc_key_map = ir_codes_dib0700_table, |
2659 | .rc_query = dib0700_rc_query | 2678 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), |
2660 | 2679 | .rc_query = dib0700_rc_query | |
2680 | }, | ||
2661 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2681 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2662 | .num_adapters = 2, | 2682 | .num_adapters = 2, |
2663 | .adapter = { | 2683 | .adapter = { |
@@ -2697,10 +2717,12 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2697 | }, | 2717 | }, |
2698 | }, | 2718 | }, |
2699 | 2719 | ||
2700 | .rc_interval = DEFAULT_RC_INTERVAL, | 2720 | .rc.legacy = { |
2701 | .rc_key_map = ir_codes_dib0700_table, | 2721 | .rc_interval = DEFAULT_RC_INTERVAL, |
2702 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), | 2722 | .rc_key_map = ir_codes_dib0700_table, |
2703 | .rc_query = dib0700_rc_query | 2723 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), |
2724 | .rc_query = dib0700_rc_query | ||
2725 | }, | ||
2704 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 2726 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
2705 | .num_adapters = 1, | 2727 | .num_adapters = 1, |
2706 | .adapter = { | 2728 | .adapter = { |
@@ -2728,10 +2750,12 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2728 | }, | 2750 | }, |
2729 | }, | 2751 | }, |
2730 | 2752 | ||
2731 | .rc_interval = DEFAULT_RC_INTERVAL, | 2753 | .rc.legacy = { |
2732 | .rc_key_map = ir_codes_dib0700_table, | 2754 | .rc_interval = DEFAULT_RC_INTERVAL, |
2733 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), | 2755 | .rc_key_map = ir_codes_dib0700_table, |
2734 | .rc_query = dib0700_rc_query | 2756 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dib0700_table), |
2757 | .rc_query = dib0700_rc_query | ||
2758 | }, | ||
2735 | }, | 2759 | }, |
2736 | }; | 2760 | }; |
2737 | 2761 | ||
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c b/drivers/media/dvb/dvb-usb/dibusb-mb.c index eb2e6f050fbe..8e3c0d2cce16 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-mb.c +++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c | |||
@@ -211,10 +211,12 @@ static struct dvb_usb_device_properties dibusb1_1_properties = { | |||
211 | 211 | ||
212 | .power_ctrl = dibusb_power_ctrl, | 212 | .power_ctrl = dibusb_power_ctrl, |
213 | 213 | ||
214 | .rc_interval = DEFAULT_RC_INTERVAL, | 214 | .rc.legacy = { |
215 | .rc_key_map = ir_codes_dibusb_table, | 215 | .rc_interval = DEFAULT_RC_INTERVAL, |
216 | .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ | 216 | .rc_key_map = ir_codes_dibusb_table, |
217 | .rc_query = dibusb_rc_query, | 217 | .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ |
218 | .rc_query = dibusb_rc_query, | ||
219 | }, | ||
218 | 220 | ||
219 | .i2c_algo = &dibusb_i2c_algo, | 221 | .i2c_algo = &dibusb_i2c_algo, |
220 | 222 | ||
@@ -295,10 +297,12 @@ static struct dvb_usb_device_properties dibusb1_1_an2235_properties = { | |||
295 | }, | 297 | }, |
296 | .power_ctrl = dibusb_power_ctrl, | 298 | .power_ctrl = dibusb_power_ctrl, |
297 | 299 | ||
298 | .rc_interval = DEFAULT_RC_INTERVAL, | 300 | .rc.legacy = { |
299 | .rc_key_map = ir_codes_dibusb_table, | 301 | .rc_interval = DEFAULT_RC_INTERVAL, |
300 | .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ | 302 | .rc_key_map = ir_codes_dibusb_table, |
301 | .rc_query = dibusb_rc_query, | 303 | .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ |
304 | .rc_query = dibusb_rc_query, | ||
305 | }, | ||
302 | 306 | ||
303 | .i2c_algo = &dibusb_i2c_algo, | 307 | .i2c_algo = &dibusb_i2c_algo, |
304 | 308 | ||
@@ -359,10 +363,12 @@ static struct dvb_usb_device_properties dibusb2_0b_properties = { | |||
359 | }, | 363 | }, |
360 | .power_ctrl = dibusb2_0_power_ctrl, | 364 | .power_ctrl = dibusb2_0_power_ctrl, |
361 | 365 | ||
362 | .rc_interval = DEFAULT_RC_INTERVAL, | 366 | .rc.legacy = { |
363 | .rc_key_map = ir_codes_dibusb_table, | 367 | .rc_interval = DEFAULT_RC_INTERVAL, |
364 | .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ | 368 | .rc_key_map = ir_codes_dibusb_table, |
365 | .rc_query = dibusb_rc_query, | 369 | .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ |
370 | .rc_query = dibusb_rc_query, | ||
371 | }, | ||
366 | 372 | ||
367 | .i2c_algo = &dibusb_i2c_algo, | 373 | .i2c_algo = &dibusb_i2c_algo, |
368 | 374 | ||
@@ -416,10 +422,12 @@ static struct dvb_usb_device_properties artec_t1_usb2_properties = { | |||
416 | }, | 422 | }, |
417 | .power_ctrl = dibusb2_0_power_ctrl, | 423 | .power_ctrl = dibusb2_0_power_ctrl, |
418 | 424 | ||
419 | .rc_interval = DEFAULT_RC_INTERVAL, | 425 | .rc.legacy = { |
420 | .rc_key_map = ir_codes_dibusb_table, | 426 | .rc_interval = DEFAULT_RC_INTERVAL, |
421 | .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ | 427 | .rc_key_map = ir_codes_dibusb_table, |
422 | .rc_query = dibusb_rc_query, | 428 | .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ |
429 | .rc_query = dibusb_rc_query, | ||
430 | }, | ||
423 | 431 | ||
424 | .i2c_algo = &dibusb_i2c_algo, | 432 | .i2c_algo = &dibusb_i2c_algo, |
425 | 433 | ||
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mc.c b/drivers/media/dvb/dvb-usb/dibusb-mc.c index 588308eb6638..1cbc41cb4e8f 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-mc.c +++ b/drivers/media/dvb/dvb-usb/dibusb-mc.c | |||
@@ -81,10 +81,12 @@ static struct dvb_usb_device_properties dibusb_mc_properties = { | |||
81 | }, | 81 | }, |
82 | .power_ctrl = dibusb2_0_power_ctrl, | 82 | .power_ctrl = dibusb2_0_power_ctrl, |
83 | 83 | ||
84 | .rc_interval = DEFAULT_RC_INTERVAL, | 84 | .rc.legacy = { |
85 | .rc_key_map = ir_codes_dibusb_table, | 85 | .rc_interval = DEFAULT_RC_INTERVAL, |
86 | .rc_key_map_size = 111, /* FIXME */ | 86 | .rc_key_map = ir_codes_dibusb_table, |
87 | .rc_query = dibusb_rc_query, | 87 | .rc_key_map_size = 111, /* FIXME */ |
88 | .rc_query = dibusb_rc_query, | ||
89 | }, | ||
88 | 90 | ||
89 | .i2c_algo = &dibusb_i2c_algo, | 91 | .i2c_algo = &dibusb_i2c_algo, |
90 | 92 | ||
diff --git a/drivers/media/dvb/dvb-usb/digitv.c b/drivers/media/dvb/dvb-usb/digitv.c index 73f14a24ffab..13d006bb19db 100644 --- a/drivers/media/dvb/dvb-usb/digitv.c +++ b/drivers/media/dvb/dvb-usb/digitv.c | |||
@@ -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_key_map_size; i++) { | 240 | for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { |
241 | if (rc5_custom(&d->props.rc_key_map[i]) == key[1] && | 241 | if (rc5_custom(&d->props.rc.legacy.rc_key_map[i]) == key[1] && |
242 | rc5_data(&d->props.rc_key_map[i]) == key[2]) { | 242 | rc5_data(&d->props.rc.legacy.rc_key_map[i]) == key[2]) { |
243 | *event = d->props.rc_key_map[i].keycode; | 243 | *event = d->props.rc.legacy.rc_key_map[i].keycode; |
244 | *state = REMOTE_KEY_PRESSED; | 244 | *state = REMOTE_KEY_PRESSED; |
245 | return 0; | 245 | return 0; |
246 | } | 246 | } |
@@ -310,10 +310,12 @@ static struct dvb_usb_device_properties digitv_properties = { | |||
310 | }, | 310 | }, |
311 | .identify_state = digitv_identify_state, | 311 | .identify_state = digitv_identify_state, |
312 | 312 | ||
313 | .rc_interval = 1000, | 313 | .rc.legacy = { |
314 | .rc_key_map = ir_codes_digitv_table, | 314 | .rc_interval = 1000, |
315 | .rc_key_map_size = ARRAY_SIZE(ir_codes_digitv_table), | 315 | .rc_key_map = ir_codes_digitv_table, |
316 | .rc_query = digitv_rc_query, | 316 | .rc_key_map_size = ARRAY_SIZE(ir_codes_digitv_table), |
317 | .rc_query = digitv_rc_query, | ||
318 | }, | ||
317 | 319 | ||
318 | .i2c_algo = &digitv_i2c_algo, | 320 | .i2c_algo = &digitv_i2c_algo, |
319 | 321 | ||
diff --git a/drivers/media/dvb/dvb-usb/dtt200u.c b/drivers/media/dvb/dvb-usb/dtt200u.c index c0de0c06ffab..ca495e07f35c 100644 --- a/drivers/media/dvb/dvb-usb/dtt200u.c +++ b/drivers/media/dvb/dvb-usb/dtt200u.c | |||
@@ -161,10 +161,12 @@ static struct dvb_usb_device_properties dtt200u_properties = { | |||
161 | }, | 161 | }, |
162 | .power_ctrl = dtt200u_power_ctrl, | 162 | .power_ctrl = dtt200u_power_ctrl, |
163 | 163 | ||
164 | .rc_interval = 300, | 164 | .rc.legacy = { |
165 | .rc_key_map = ir_codes_dtt200u_table, | 165 | .rc_interval = 300, |
166 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), | 166 | .rc_key_map = ir_codes_dtt200u_table, |
167 | .rc_query = dtt200u_rc_query, | 167 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), |
168 | .rc_query = dtt200u_rc_query, | ||
169 | }, | ||
168 | 170 | ||
169 | .generic_bulk_ctrl_endpoint = 0x01, | 171 | .generic_bulk_ctrl_endpoint = 0x01, |
170 | 172 | ||
@@ -206,10 +208,12 @@ static struct dvb_usb_device_properties wt220u_properties = { | |||
206 | }, | 208 | }, |
207 | .power_ctrl = dtt200u_power_ctrl, | 209 | .power_ctrl = dtt200u_power_ctrl, |
208 | 210 | ||
209 | .rc_interval = 300, | 211 | .rc.legacy = { |
210 | .rc_key_map = ir_codes_dtt200u_table, | 212 | .rc_interval = 300, |
211 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), | 213 | .rc_key_map = ir_codes_dtt200u_table, |
212 | .rc_query = dtt200u_rc_query, | 214 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), |
215 | .rc_query = dtt200u_rc_query, | ||
216 | }, | ||
213 | 217 | ||
214 | .generic_bulk_ctrl_endpoint = 0x01, | 218 | .generic_bulk_ctrl_endpoint = 0x01, |
215 | 219 | ||
@@ -251,10 +255,12 @@ static struct dvb_usb_device_properties wt220u_fc_properties = { | |||
251 | }, | 255 | }, |
252 | .power_ctrl = dtt200u_power_ctrl, | 256 | .power_ctrl = dtt200u_power_ctrl, |
253 | 257 | ||
254 | .rc_interval = 300, | 258 | .rc.legacy = { |
255 | .rc_key_map = ir_codes_dtt200u_table, | 259 | .rc_interval = 300, |
256 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), | 260 | .rc_key_map = ir_codes_dtt200u_table, |
257 | .rc_query = dtt200u_rc_query, | 261 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), |
262 | .rc_query = dtt200u_rc_query, | ||
263 | }, | ||
258 | 264 | ||
259 | .generic_bulk_ctrl_endpoint = 0x01, | 265 | .generic_bulk_ctrl_endpoint = 0x01, |
260 | 266 | ||
@@ -296,10 +302,12 @@ static struct dvb_usb_device_properties wt220u_zl0353_properties = { | |||
296 | }, | 302 | }, |
297 | .power_ctrl = dtt200u_power_ctrl, | 303 | .power_ctrl = dtt200u_power_ctrl, |
298 | 304 | ||
299 | .rc_interval = 300, | 305 | .rc.legacy = { |
300 | .rc_key_map = ir_codes_dtt200u_table, | 306 | .rc_interval = 300, |
301 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), | 307 | .rc_key_map = ir_codes_dtt200u_table, |
302 | .rc_query = dtt200u_rc_query, | 308 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), |
309 | .rc_query = dtt200u_rc_query, | ||
310 | }, | ||
303 | 311 | ||
304 | .generic_bulk_ctrl_endpoint = 0x01, | 312 | .generic_bulk_ctrl_endpoint = 0x01, |
305 | 313 | ||
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c index e210f2f14d86..7951076e8e06 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 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_key_map; | 16 | struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; |
17 | int i; | 17 | int i; |
18 | 18 | ||
19 | /* See if we can match the raw key code. */ | 19 | /* See if we can match the raw key code. */ |
20 | for (i = 0; i < d->props.rc_key_map_size; i++) | 20 | for (i = 0; i < d->props.rc.legacy.rc_key_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 dvb_usb_getkeycode(struct input_dev *dev, | |||
28 | * otherwise, input core won't let dvb_usb_setkeycode | 28 | * otherwise, input core won't let dvb_usb_setkeycode |
29 | * to work | 29 | * to work |
30 | */ | 30 | */ |
31 | for (i = 0; i < d->props.rc_key_map_size; i++) | 31 | for (i = 0; i < d->props.rc.legacy.rc_key_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 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_key_map; | 46 | struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; |
47 | int i; | 47 | int i; |
48 | 48 | ||
49 | /* Search if it is replacing an existing keycode */ | 49 | /* Search if it is replacing an existing keycode */ |
50 | for (i = 0; i < d->props.rc_key_map_size; i++) | 50 | for (i = 0; i < d->props.rc.legacy.rc_key_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_key_map_size; i++) | 57 | for (i = 0; i < d->props.rc.legacy.rc_key_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; |
@@ -92,7 +92,7 @@ static void dvb_usb_read_remote_control(struct work_struct *work) | |||
92 | if (dvb_usb_disable_rc_polling) | 92 | if (dvb_usb_disable_rc_polling) |
93 | return; | 93 | return; |
94 | 94 | ||
95 | if (d->props.rc_query(d,&event,&state)) { | 95 | if (d->props.rc.legacy.rc_query(d,&event,&state)) { |
96 | err("error while querying for an remote control event."); | 96 | err("error while querying for an remote control event."); |
97 | goto schedule; | 97 | goto schedule; |
98 | } | 98 | } |
@@ -151,7 +151,7 @@ static void dvb_usb_read_remote_control(struct work_struct *work) | |||
151 | */ | 151 | */ |
152 | 152 | ||
153 | schedule: | 153 | schedule: |
154 | schedule_delayed_work(&d->rc_query_work,msecs_to_jiffies(d->props.rc_interval)); | 154 | schedule_delayed_work(&d->rc_query_work,msecs_to_jiffies(d->props.rc.legacy.rc_interval)); |
155 | } | 155 | } |
156 | 156 | ||
157 | int dvb_usb_remote_init(struct dvb_usb_device *d) | 157 | int dvb_usb_remote_init(struct dvb_usb_device *d) |
@@ -160,8 +160,8 @@ int dvb_usb_remote_init(struct dvb_usb_device *d) | |||
160 | int i; | 160 | int i; |
161 | int err; | 161 | int err; |
162 | 162 | ||
163 | if (d->props.rc_key_map == NULL || | 163 | if (d->props.rc.legacy.rc_key_map == NULL || |
164 | d->props.rc_query == NULL || | 164 | d->props.rc.legacy.rc_query == NULL || |
165 | dvb_usb_disable_rc_polling) | 165 | dvb_usb_disable_rc_polling) |
166 | return 0; | 166 | return 0; |
167 | 167 | ||
@@ -181,20 +181,20 @@ int dvb_usb_remote_init(struct dvb_usb_device *d) | |||
181 | input_dev->setkeycode = dvb_usb_setkeycode; | 181 | input_dev->setkeycode = dvb_usb_setkeycode; |
182 | 182 | ||
183 | /* set the bits for the keys */ | 183 | /* set the bits for the keys */ |
184 | deb_rc("key map size: %d\n", d->props.rc_key_map_size); | 184 | deb_rc("key map size: %d\n", d->props.rc.legacy.rc_key_map_size); |
185 | for (i = 0; i < d->props.rc_key_map_size; i++) { | 185 | for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { |
186 | deb_rc("setting bit for event %d item %d\n", | 186 | deb_rc("setting bit for event %d item %d\n", |
187 | d->props.rc_key_map[i].keycode, i); | 187 | d->props.rc.legacy.rc_key_map[i].keycode, i); |
188 | set_bit(d->props.rc_key_map[i].keycode, input_dev->keybit); | 188 | set_bit(d->props.rc.legacy.rc_key_map[i].keycode, input_dev->keybit); |
189 | } | 189 | } |
190 | 190 | ||
191 | /* Start the remote-control polling. */ | 191 | /* Start the remote-control polling. */ |
192 | if (d->props.rc_interval < 40) | 192 | if (d->props.rc.legacy.rc_interval < 40) |
193 | d->props.rc_interval = 100; /* default */ | 193 | d->props.rc.legacy.rc_interval = 100; /* default */ |
194 | 194 | ||
195 | /* setting these two values to non-zero, we have to manage key repeats */ | 195 | /* setting these two values to non-zero, we have to manage key repeats */ |
196 | input_dev->rep[REP_PERIOD] = d->props.rc_interval; | 196 | input_dev->rep[REP_PERIOD] = d->props.rc.legacy.rc_interval; |
197 | input_dev->rep[REP_DELAY] = d->props.rc_interval + 150; | 197 | input_dev->rep[REP_DELAY] = d->props.rc.legacy.rc_interval + 150; |
198 | 198 | ||
199 | input_set_drvdata(input_dev, d); | 199 | input_set_drvdata(input_dev, d); |
200 | 200 | ||
@@ -208,8 +208,8 @@ int dvb_usb_remote_init(struct dvb_usb_device *d) | |||
208 | 208 | ||
209 | INIT_DELAYED_WORK(&d->rc_query_work, dvb_usb_read_remote_control); | 209 | INIT_DELAYED_WORK(&d->rc_query_work, dvb_usb_read_remote_control); |
210 | 210 | ||
211 | info("schedule remote query interval to %d msecs.", d->props.rc_interval); | 211 | info("schedule remote query interval to %d msecs.", d->props.rc.legacy.rc_interval); |
212 | schedule_delayed_work(&d->rc_query_work,msecs_to_jiffies(d->props.rc_interval)); | 212 | schedule_delayed_work(&d->rc_query_work,msecs_to_jiffies(d->props.rc.legacy.rc_interval)); |
213 | 213 | ||
214 | d->state |= DVB_USB_STATE_REMOTE; | 214 | d->state |= DVB_USB_STATE_REMOTE; |
215 | 215 | ||
@@ -234,7 +234,7 @@ int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d, | |||
234 | u8 keybuf[5], u32 *event, int *state) | 234 | u8 keybuf[5], u32 *event, int *state) |
235 | { | 235 | { |
236 | int i; | 236 | int i; |
237 | struct ir_scancode *keymap = d->props.rc_key_map; | 237 | struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; |
238 | *event = 0; | 238 | *event = 0; |
239 | *state = REMOTE_NO_KEY_PRESSED; | 239 | *state = REMOTE_NO_KEY_PRESSED; |
240 | switch (keybuf[0]) { | 240 | switch (keybuf[0]) { |
@@ -247,7 +247,7 @@ int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d, | |||
247 | break; | 247 | break; |
248 | } | 248 | } |
249 | /* See if we can match the raw key code. */ | 249 | /* See if we can match the raw key code. */ |
250 | for (i = 0; i < d->props.rc_key_map_size; i++) | 250 | for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) |
251 | if (rc5_custom(&keymap[i]) == keybuf[1] && | 251 | if (rc5_custom(&keymap[i]) == keybuf[1] && |
252 | rc5_data(&keymap[i]) == keybuf[3]) { | 252 | rc5_data(&keymap[i]) == keybuf[3]) { |
253 | *event = keymap[i].keycode; | 253 | *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 832bbfd55f5b..76f972493768 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb.h | |||
@@ -158,6 +158,25 @@ struct dvb_usb_adapter_properties { | |||
158 | }; | 158 | }; |
159 | 159 | ||
160 | /** | 160 | /** |
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 | ||
163 | * remote control handling). | ||
164 | * @rc_key_map_size: number of items in @rc_key_map. | ||
165 | * @rc_query: called to query an event event. | ||
166 | * @rc_interval: time in ms between two queries. | ||
167 | */ | ||
168 | struct dvb_rc_legacy { | ||
169 | /* remote control properties */ | ||
170 | #define REMOTE_NO_KEY_PRESSED 0x00 | ||
171 | #define REMOTE_KEY_PRESSED 0x01 | ||
172 | #define REMOTE_KEY_REPEAT 0x02 | ||
173 | struct ir_scancode *rc_key_map; | ||
174 | int rc_key_map_size; | ||
175 | int (*rc_query) (struct dvb_usb_device *, u32 *, int *); | ||
176 | int rc_interval; | ||
177 | }; | ||
178 | |||
179 | /** | ||
161 | * struct dvb_usb_device_properties - properties of a dvb-usb-device | 180 | * struct dvb_usb_device_properties - properties of a dvb-usb-device |
162 | * @usb_ctrl: which USB device-side controller is in use. Needed for firmware | 181 | * @usb_ctrl: which USB device-side controller is in use. Needed for firmware |
163 | * download. | 182 | * download. |
@@ -175,11 +194,7 @@ struct dvb_usb_adapter_properties { | |||
175 | * @identify_state: called to determine the state (cold or warm), when it | 194 | * @identify_state: called to determine the state (cold or warm), when it |
176 | * is not distinguishable by the USB IDs. | 195 | * is not distinguishable by the USB IDs. |
177 | * | 196 | * |
178 | * @rc_key_map: a hard-wired array of struct ir_scancode (NULL to disable | 197 | * @rc: remote controller properties |
179 | * remote control handling). | ||
180 | * @rc_key_map_size: number of items in @rc_key_map. | ||
181 | * @rc_query: called to query an event event. | ||
182 | * @rc_interval: time in ms between two queries. | ||
183 | * | 198 | * |
184 | * @i2c_algo: i2c_algorithm if the device has I2CoverUSB. | 199 | * @i2c_algo: i2c_algorithm if the device has I2CoverUSB. |
185 | * | 200 | * |
@@ -223,14 +238,9 @@ struct dvb_usb_device_properties { | |||
223 | int (*identify_state) (struct usb_device *, struct dvb_usb_device_properties *, | 238 | int (*identify_state) (struct usb_device *, struct dvb_usb_device_properties *, |
224 | struct dvb_usb_device_description **, int *); | 239 | struct dvb_usb_device_description **, int *); |
225 | 240 | ||
226 | /* remote control properties */ | 241 | union { |
227 | #define REMOTE_NO_KEY_PRESSED 0x00 | 242 | struct dvb_rc_legacy legacy; |
228 | #define REMOTE_KEY_PRESSED 0x01 | 243 | } rc; |
229 | #define REMOTE_KEY_REPEAT 0x02 | ||
230 | struct ir_scancode *rc_key_map; | ||
231 | int rc_key_map_size; | ||
232 | int (*rc_query) (struct dvb_usb_device *, u32 *, int *); | ||
233 | int rc_interval; | ||
234 | 244 | ||
235 | struct i2c_algorithm *i2c_algo; | 245 | struct i2c_algorithm *i2c_algo; |
236 | 246 | ||
diff --git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c index 2528e06ec31f..774df88dc6e3 100644 --- a/drivers/media/dvb/dvb-usb/dw2102.c +++ b/drivers/media/dvb/dvb-usb/dw2102.c | |||
@@ -1075,8 +1075,8 @@ static struct ir_codes_dvb_usb_table_table keys_tables[] = { | |||
1075 | 1075 | ||
1076 | static int dw2102_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | 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_key_map; | 1078 | struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; |
1079 | int keymap_size = d->props.rc_key_map_size; | 1079 | int keymap_size = d->props.rc.legacy.rc_key_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,13 +1185,13 @@ 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_key_map = ir_codes_tbs_table; | 1188 | s6x0_properties.rc.legacy.rc_key_map = ir_codes_tbs_table; |
1189 | s6x0_properties.rc_key_map_size = | 1189 | s6x0_properties.rc.legacy.rc_key_map_size = |
1190 | ARRAY_SIZE(ir_codes_tbs_table); | 1190 | ARRAY_SIZE(ir_codes_tbs_table); |
1191 | break; | 1191 | break; |
1192 | case USB_PID_TEVII_S650: | 1192 | case USB_PID_TEVII_S650: |
1193 | dw2104_properties.rc_key_map = ir_codes_tevii_table; | 1193 | dw2104_properties.rc.legacy.rc_key_map = ir_codes_tevii_table; |
1194 | dw2104_properties.rc_key_map_size = | 1194 | dw2104_properties.rc.legacy.rc_key_map_size = |
1195 | ARRAY_SIZE(ir_codes_tevii_table); | 1195 | ARRAY_SIZE(ir_codes_tevii_table); |
1196 | case USB_PID_DW2104: | 1196 | case USB_PID_DW2104: |
1197 | reset = 1; | 1197 | reset = 1; |
@@ -1255,10 +1255,13 @@ static struct dvb_usb_device_properties dw2102_properties = { | |||
1255 | .no_reconnect = 1, | 1255 | .no_reconnect = 1, |
1256 | 1256 | ||
1257 | .i2c_algo = &dw2102_serit_i2c_algo, | 1257 | .i2c_algo = &dw2102_serit_i2c_algo, |
1258 | .rc_key_map = ir_codes_dw210x_table, | 1258 | |
1259 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), | 1259 | .rc.legacy = { |
1260 | .rc_interval = 150, | 1260 | .rc_key_map = ir_codes_dw210x_table, |
1261 | .rc_query = dw2102_rc_query, | 1261 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), |
1262 | .rc_interval = 150, | ||
1263 | .rc_query = dw2102_rc_query, | ||
1264 | }, | ||
1262 | 1265 | ||
1263 | .generic_bulk_ctrl_endpoint = 0x81, | 1266 | .generic_bulk_ctrl_endpoint = 0x81, |
1264 | /* parameter for the MPEG2-data transfer */ | 1267 | /* parameter for the MPEG2-data transfer */ |
@@ -1306,10 +1309,12 @@ static struct dvb_usb_device_properties dw2104_properties = { | |||
1306 | .no_reconnect = 1, | 1309 | .no_reconnect = 1, |
1307 | 1310 | ||
1308 | .i2c_algo = &dw2104_i2c_algo, | 1311 | .i2c_algo = &dw2104_i2c_algo, |
1309 | .rc_key_map = ir_codes_dw210x_table, | 1312 | .rc.legacy = { |
1310 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), | 1313 | .rc_key_map = ir_codes_dw210x_table, |
1311 | .rc_interval = 150, | 1314 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), |
1312 | .rc_query = dw2102_rc_query, | 1315 | .rc_interval = 150, |
1316 | .rc_query = dw2102_rc_query, | ||
1317 | }, | ||
1313 | 1318 | ||
1314 | .generic_bulk_ctrl_endpoint = 0x81, | 1319 | .generic_bulk_ctrl_endpoint = 0x81, |
1315 | /* parameter for the MPEG2-data transfer */ | 1320 | /* parameter for the MPEG2-data transfer */ |
@@ -1353,10 +1358,12 @@ static struct dvb_usb_device_properties dw3101_properties = { | |||
1353 | .no_reconnect = 1, | 1358 | .no_reconnect = 1, |
1354 | 1359 | ||
1355 | .i2c_algo = &dw3101_i2c_algo, | 1360 | .i2c_algo = &dw3101_i2c_algo, |
1356 | .rc_key_map = ir_codes_dw210x_table, | 1361 | .rc.legacy = { |
1357 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), | 1362 | .rc_key_map = ir_codes_dw210x_table, |
1358 | .rc_interval = 150, | 1363 | .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), |
1359 | .rc_query = dw2102_rc_query, | 1364 | .rc_interval = 150, |
1365 | .rc_query = dw2102_rc_query, | ||
1366 | }, | ||
1360 | 1367 | ||
1361 | .generic_bulk_ctrl_endpoint = 0x81, | 1368 | .generic_bulk_ctrl_endpoint = 0x81, |
1362 | /* parameter for the MPEG2-data transfer */ | 1369 | /* parameter for the MPEG2-data transfer */ |
@@ -1396,10 +1403,12 @@ static struct dvb_usb_device_properties s6x0_properties = { | |||
1396 | .no_reconnect = 1, | 1403 | .no_reconnect = 1, |
1397 | 1404 | ||
1398 | .i2c_algo = &s6x0_i2c_algo, | 1405 | .i2c_algo = &s6x0_i2c_algo, |
1399 | .rc_key_map = ir_codes_tevii_table, | 1406 | .rc.legacy = { |
1400 | .rc_key_map_size = ARRAY_SIZE(ir_codes_tevii_table), | 1407 | .rc_key_map = ir_codes_tevii_table, |
1401 | .rc_interval = 150, | 1408 | .rc_key_map_size = ARRAY_SIZE(ir_codes_tevii_table), |
1402 | .rc_query = dw2102_rc_query, | 1409 | .rc_interval = 150, |
1410 | .rc_query = dw2102_rc_query, | ||
1411 | }, | ||
1403 | 1412 | ||
1404 | .generic_bulk_ctrl_endpoint = 0x81, | 1413 | .generic_bulk_ctrl_endpoint = 0x81, |
1405 | .num_adapters = 1, | 1414 | .num_adapters = 1, |
@@ -1459,8 +1468,8 @@ static int dw2102_probe(struct usb_interface *intf, | |||
1459 | /* fill only different fields */ | 1468 | /* fill only different fields */ |
1460 | p7500->firmware = "dvb-usb-p7500.fw"; | 1469 | p7500->firmware = "dvb-usb-p7500.fw"; |
1461 | p7500->devices[0] = d7500; | 1470 | p7500->devices[0] = d7500; |
1462 | p7500->rc_key_map = ir_codes_tbs_table; | 1471 | p7500->rc.legacy.rc_key_map = ir_codes_tbs_table; |
1463 | p7500->rc_key_map_size = ARRAY_SIZE(ir_codes_tbs_table); | 1472 | p7500->rc.legacy.rc_key_map_size = ARRAY_SIZE(ir_codes_tbs_table); |
1464 | p7500->adapter->frontend_attach = prof_7500_frontend_attach; | 1473 | p7500->adapter->frontend_attach = prof_7500_frontend_attach; |
1465 | 1474 | ||
1466 | 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 1e1cb6b6d654..bdef1a18b664 100644 --- a/drivers/media/dvb/dvb-usb/m920x.c +++ b/drivers/media/dvb/dvb-usb/m920x.c | |||
@@ -69,7 +69,7 @@ static int m920x_init(struct dvb_usb_device *d, struct m920x_inits *rc_seq) | |||
69 | int adap_enabled[M9206_MAX_ADAPTERS] = { 0 }; | 69 | int adap_enabled[M9206_MAX_ADAPTERS] = { 0 }; |
70 | 70 | ||
71 | /* Remote controller init. */ | 71 | /* Remote controller init. */ |
72 | if (d->props.rc_query) { | 72 | if (d->props.rc.legacy.rc_query) { |
73 | deb("Initialising remote control\n"); | 73 | deb("Initialising remote control\n"); |
74 | while (rc_seq->address) { | 74 | while (rc_seq->address) { |
75 | if ((ret = m920x_write(d->udev, M9206_CORE, | 75 | if ((ret = m920x_write(d->udev, M9206_CORE, |
@@ -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_key_map_size; i++) | 145 | for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) |
146 | if (rc5_data(&d->props.rc_key_map[i]) == rc_state[1]) { | 146 | if (rc5_data(&d->props.rc.legacy.rc_key_map[i]) == rc_state[1]) { |
147 | *event = d->props.rc_key_map[i].keycode; | 147 | *event = d->props.rc.legacy.rc_key_map[i].keycode; |
148 | 148 | ||
149 | switch(rc_state[0]) { | 149 | switch(rc_state[0]) { |
150 | case 0x80: | 150 | case 0x80: |
@@ -784,10 +784,12 @@ static struct dvb_usb_device_properties megasky_properties = { | |||
784 | .firmware = "dvb-usb-megasky-02.fw", | 784 | .firmware = "dvb-usb-megasky-02.fw", |
785 | .download_firmware = m920x_firmware_download, | 785 | .download_firmware = m920x_firmware_download, |
786 | 786 | ||
787 | .rc_interval = 100, | 787 | .rc.legacy = { |
788 | .rc_key_map = ir_codes_megasky_table, | 788 | .rc_interval = 100, |
789 | .rc_key_map_size = ARRAY_SIZE(ir_codes_megasky_table), | 789 | .rc_key_map = ir_codes_megasky_table, |
790 | .rc_query = m920x_rc_query, | 790 | .rc_key_map_size = ARRAY_SIZE(ir_codes_megasky_table), |
791 | .rc_query = m920x_rc_query, | ||
792 | }, | ||
791 | 793 | ||
792 | .size_of_priv = sizeof(struct m920x_state), | 794 | .size_of_priv = sizeof(struct m920x_state), |
793 | 795 | ||
@@ -885,10 +887,12 @@ static struct dvb_usb_device_properties tvwalkertwin_properties = { | |||
885 | .firmware = "dvb-usb-tvwalkert.fw", | 887 | .firmware = "dvb-usb-tvwalkert.fw", |
886 | .download_firmware = m920x_firmware_download, | 888 | .download_firmware = m920x_firmware_download, |
887 | 889 | ||
888 | .rc_interval = 100, | 890 | .rc.legacy = { |
889 | .rc_key_map = ir_codes_tvwalkertwin_table, | 891 | .rc_interval = 100, |
890 | .rc_key_map_size = ARRAY_SIZE(ir_codes_tvwalkertwin_table), | 892 | .rc_key_map = ir_codes_tvwalkertwin_table, |
891 | .rc_query = m920x_rc_query, | 893 | .rc_key_map_size = ARRAY_SIZE(ir_codes_tvwalkertwin_table), |
894 | .rc_query = m920x_rc_query, | ||
895 | }, | ||
892 | 896 | ||
893 | .size_of_priv = sizeof(struct m920x_state), | 897 | .size_of_priv = sizeof(struct m920x_state), |
894 | 898 | ||
@@ -992,10 +996,12 @@ static struct dvb_usb_device_properties pinnacle_pctv310e_properties = { | |||
992 | .usb_ctrl = DEVICE_SPECIFIC, | 996 | .usb_ctrl = DEVICE_SPECIFIC, |
993 | .download_firmware = NULL, | 997 | .download_firmware = NULL, |
994 | 998 | ||
995 | .rc_interval = 100, | 999 | .rc.legacy = { |
996 | .rc_key_map = ir_codes_pinnacle310e_table, | 1000 | .rc_interval = 100, |
997 | .rc_key_map_size = ARRAY_SIZE(ir_codes_pinnacle310e_table), | 1001 | .rc_key_map = ir_codes_pinnacle310e_table, |
998 | .rc_query = m920x_rc_query, | 1002 | .rc_key_map_size = ARRAY_SIZE(ir_codes_pinnacle310e_table), |
1003 | .rc_query = m920x_rc_query, | ||
1004 | }, | ||
999 | 1005 | ||
1000 | .size_of_priv = sizeof(struct m920x_state), | 1006 | .size_of_priv = sizeof(struct m920x_state), |
1001 | 1007 | ||
diff --git a/drivers/media/dvb/dvb-usb/nova-t-usb2.c b/drivers/media/dvb/dvb-usb/nova-t-usb2.c index b48e217ef884..181f36a12e2a 100644 --- a/drivers/media/dvb/dvb-usb/nova-t-usb2.c +++ b/drivers/media/dvb/dvb-usb/nova-t-usb2.c | |||
@@ -195,10 +195,12 @@ static struct dvb_usb_device_properties nova_t_properties = { | |||
195 | .power_ctrl = dibusb2_0_power_ctrl, | 195 | .power_ctrl = dibusb2_0_power_ctrl, |
196 | .read_mac_address = nova_t_read_mac_address, | 196 | .read_mac_address = nova_t_read_mac_address, |
197 | 197 | ||
198 | .rc_interval = 100, | 198 | .rc.legacy = { |
199 | .rc_key_map = ir_codes_haupp_table, | 199 | .rc_interval = 100, |
200 | .rc_key_map_size = ARRAY_SIZE(ir_codes_haupp_table), | 200 | .rc_key_map = ir_codes_haupp_table, |
201 | .rc_query = nova_t_rc_query, | 201 | .rc_key_map_size = ARRAY_SIZE(ir_codes_haupp_table), |
202 | .rc_query = nova_t_rc_query, | ||
203 | }, | ||
202 | 204 | ||
203 | .i2c_algo = &dibusb_i2c_algo, | 205 | .i2c_algo = &dibusb_i2c_algo, |
204 | 206 | ||
diff --git a/drivers/media/dvb/dvb-usb/opera1.c b/drivers/media/dvb/dvb-usb/opera1.c index 6a2f9e25f08a..6b22ec64ab0c 100644 --- a/drivers/media/dvb/dvb-usb/opera1.c +++ b/drivers/media/dvb/dvb-usb/opera1.c | |||
@@ -498,10 +498,12 @@ static struct dvb_usb_device_properties opera1_properties = { | |||
498 | .power_ctrl = opera1_power_ctrl, | 498 | .power_ctrl = opera1_power_ctrl, |
499 | .i2c_algo = &opera1_i2c_algo, | 499 | .i2c_algo = &opera1_i2c_algo, |
500 | 500 | ||
501 | .rc_key_map = ir_codes_opera1_table, | 501 | .rc.legacy = { |
502 | .rc_key_map_size = ARRAY_SIZE(ir_codes_opera1_table), | 502 | .rc_key_map = ir_codes_opera1_table, |
503 | .rc_interval = 200, | 503 | .rc_key_map_size = ARRAY_SIZE(ir_codes_opera1_table), |
504 | .rc_query = opera1_rc_query, | 504 | .rc_interval = 200, |
505 | .rc_query = opera1_rc_query, | ||
506 | }, | ||
505 | .read_mac_address = opera1_read_mac_address, | 507 | .read_mac_address = opera1_read_mac_address, |
506 | .generic_bulk_ctrl_endpoint = 0x00, | 508 | .generic_bulk_ctrl_endpoint = 0x00, |
507 | /* parameter for the MPEG2-data transfer */ | 509 | /* parameter for the MPEG2-data transfer */ |
diff --git a/drivers/media/dvb/dvb-usb/vp702x.c b/drivers/media/dvb/dvb-usb/vp702x.c index 7ea57a43757a..5c9f3275aaa0 100644 --- a/drivers/media/dvb/dvb-usb/vp702x.c +++ b/drivers/media/dvb/dvb-usb/vp702x.c | |||
@@ -283,10 +283,12 @@ static struct dvb_usb_device_properties vp702x_properties = { | |||
283 | }, | 283 | }, |
284 | .read_mac_address = vp702x_read_mac_addr, | 284 | .read_mac_address = vp702x_read_mac_addr, |
285 | 285 | ||
286 | .rc_key_map = ir_codes_vp702x_table, | 286 | .rc.legacy = { |
287 | .rc_key_map_size = ARRAY_SIZE(ir_codes_vp702x_table), | 287 | .rc_key_map = ir_codes_vp702x_table, |
288 | .rc_interval = 400, | 288 | .rc_key_map_size = ARRAY_SIZE(ir_codes_vp702x_table), |
289 | .rc_query = vp702x_rc_query, | 289 | .rc_interval = 400, |
290 | .rc_query = vp702x_rc_query, | ||
291 | }, | ||
290 | 292 | ||
291 | .num_device_descs = 1, | 293 | .num_device_descs = 1, |
292 | .devices = { | 294 | .devices = { |
diff --git a/drivers/media/dvb/dvb-usb/vp7045.c b/drivers/media/dvb/dvb-usb/vp7045.c index 30663a85619c..f13791ca5994 100644 --- a/drivers/media/dvb/dvb-usb/vp7045.c +++ b/drivers/media/dvb/dvb-usb/vp7045.c | |||
@@ -259,10 +259,12 @@ static struct dvb_usb_device_properties vp7045_properties = { | |||
259 | .power_ctrl = vp7045_power_ctrl, | 259 | .power_ctrl = vp7045_power_ctrl, |
260 | .read_mac_address = vp7045_read_mac_addr, | 260 | .read_mac_address = vp7045_read_mac_addr, |
261 | 261 | ||
262 | .rc_interval = 400, | 262 | .rc.legacy = { |
263 | .rc_key_map = ir_codes_vp7045_table, | 263 | .rc_interval = 400, |
264 | .rc_key_map_size = ARRAY_SIZE(ir_codes_vp7045_table), | 264 | .rc_key_map = ir_codes_vp7045_table, |
265 | .rc_query = vp7045_rc_query, | 265 | .rc_key_map_size = ARRAY_SIZE(ir_codes_vp7045_table), |
266 | .rc_query = vp7045_rc_query, | ||
267 | }, | ||
266 | 268 | ||
267 | .num_device_descs = 2, | 269 | .num_device_descs = 2, |
268 | .devices = { | 270 | .devices = { |