aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/dw2102.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dw2102.c')
-rw-r--r--drivers/media/dvb/dvb-usb/dw2102.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c
index 774df88dc6e3..2c307ba0d28b 100644
--- a/drivers/media/dvb/dvb-usb/dw2102.c
+++ b/drivers/media/dvb/dvb-usb/dw2102.c
@@ -73,8 +73,8 @@
73 "Please see linux/Documentation/dvb/ for more details " \ 73 "Please see linux/Documentation/dvb/ for more details " \
74 "on firmware-problems." 74 "on firmware-problems."
75 75
76struct ir_codes_dvb_usb_table_table { 76struct rc_map_dvb_usb_table_table {
77 struct ir_scancode *rc_keys; 77 struct rc_map_table *rc_keys;
78 int rc_keys_size; 78 int rc_keys_size;
79}; 79};
80 80
@@ -948,7 +948,7 @@ static int dw3101_tuner_attach(struct dvb_usb_adapter *adap)
948 return 0; 948 return 0;
949} 949}
950 950
951static struct ir_scancode ir_codes_dw210x_table[] = { 951static struct rc_map_table rc_map_dw210x_table[] = {
952 { 0xf80a, KEY_Q }, /*power*/ 952 { 0xf80a, KEY_Q }, /*power*/
953 { 0xf80c, KEY_M }, /*mute*/ 953 { 0xf80c, KEY_M }, /*mute*/
954 { 0xf811, KEY_1 }, 954 { 0xf811, KEY_1 },
@@ -982,7 +982,7 @@ static struct ir_scancode ir_codes_dw210x_table[] = {
982 { 0xf81b, KEY_B }, /*recall*/ 982 { 0xf81b, KEY_B }, /*recall*/
983}; 983};
984 984
985static struct ir_scancode ir_codes_tevii_table[] = { 985static struct rc_map_table rc_map_tevii_table[] = {
986 { 0xf80a, KEY_POWER }, 986 { 0xf80a, KEY_POWER },
987 { 0xf80c, KEY_MUTE }, 987 { 0xf80c, KEY_MUTE },
988 { 0xf811, KEY_1 }, 988 { 0xf811, KEY_1 },
@@ -1032,7 +1032,7 @@ static struct ir_scancode ir_codes_tevii_table[] = {
1032 { 0xf858, KEY_SWITCHVIDEOMODE }, 1032 { 0xf858, KEY_SWITCHVIDEOMODE },
1033}; 1033};
1034 1034
1035static struct ir_scancode ir_codes_tbs_table[] = { 1035static struct rc_map_table rc_map_tbs_table[] = {
1036 { 0xf884, KEY_POWER }, 1036 { 0xf884, KEY_POWER },
1037 { 0xf894, KEY_MUTE }, 1037 { 0xf894, KEY_MUTE },
1038 { 0xf887, KEY_1 }, 1038 { 0xf887, KEY_1 },
@@ -1067,16 +1067,16 @@ static struct ir_scancode ir_codes_tbs_table[] = {
1067 { 0xf89b, KEY_MODE } 1067 { 0xf89b, KEY_MODE }
1068}; 1068};
1069 1069
1070static struct ir_codes_dvb_usb_table_table keys_tables[] = { 1070static struct rc_map_dvb_usb_table_table keys_tables[] = {
1071 { ir_codes_dw210x_table, ARRAY_SIZE(ir_codes_dw210x_table) }, 1071 { rc_map_dw210x_table, ARRAY_SIZE(rc_map_dw210x_table) },
1072 { ir_codes_tevii_table, ARRAY_SIZE(ir_codes_tevii_table) }, 1072 { rc_map_tevii_table, ARRAY_SIZE(rc_map_tevii_table) },
1073 { ir_codes_tbs_table, ARRAY_SIZE(ir_codes_tbs_table) }, 1073 { rc_map_tbs_table, ARRAY_SIZE(rc_map_tbs_table) },
1074}; 1074};
1075 1075
1076static int dw2102_rc_query(struct dvb_usb_device *d, u32 *event, int *state) 1076static int dw2102_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
1077{ 1077{
1078 struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; 1078 struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table;
1079 int keymap_size = d->props.rc.legacy.rc_key_map_size; 1079 int keymap_size = d->props.rc.legacy.rc_map_size;
1080 u8 key[2]; 1080 u8 key[2];
1081 struct i2c_msg msg = { 1081 struct i2c_msg msg = {
1082 .addr = DW2102_RC_QUERY, 1082 .addr = DW2102_RC_QUERY,
@@ -1185,14 +1185,14 @@ static int dw2102_load_firmware(struct usb_device *dev,
1185 /* init registers */ 1185 /* init registers */
1186 switch (dev->descriptor.idProduct) { 1186 switch (dev->descriptor.idProduct) {
1187 case USB_PID_PROF_1100: 1187 case USB_PID_PROF_1100:
1188 s6x0_properties.rc.legacy.rc_key_map = ir_codes_tbs_table; 1188 s6x0_properties.rc.legacy.rc_map_table = rc_map_tbs_table;
1189 s6x0_properties.rc.legacy.rc_key_map_size = 1189 s6x0_properties.rc.legacy.rc_map_size =
1190 ARRAY_SIZE(ir_codes_tbs_table); 1190 ARRAY_SIZE(rc_map_tbs_table);
1191 break; 1191 break;
1192 case USB_PID_TEVII_S650: 1192 case USB_PID_TEVII_S650:
1193 dw2104_properties.rc.legacy.rc_key_map = ir_codes_tevii_table; 1193 dw2104_properties.rc.legacy.rc_map_table = rc_map_tevii_table;
1194 dw2104_properties.rc.legacy.rc_key_map_size = 1194 dw2104_properties.rc.legacy.rc_map_size =
1195 ARRAY_SIZE(ir_codes_tevii_table); 1195 ARRAY_SIZE(rc_map_tevii_table);
1196 case USB_PID_DW2104: 1196 case USB_PID_DW2104:
1197 reset = 1; 1197 reset = 1;
1198 dw210x_op_rw(dev, 0xc4, 0x0000, 0, &reset, 1, 1198 dw210x_op_rw(dev, 0xc4, 0x0000, 0, &reset, 1,
@@ -1257,8 +1257,8 @@ static struct dvb_usb_device_properties dw2102_properties = {
1257 .i2c_algo = &dw2102_serit_i2c_algo, 1257 .i2c_algo = &dw2102_serit_i2c_algo,
1258 1258
1259 .rc.legacy = { 1259 .rc.legacy = {
1260 .rc_key_map = ir_codes_dw210x_table, 1260 .rc_map_table = rc_map_dw210x_table,
1261 .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), 1261 .rc_map_size = ARRAY_SIZE(rc_map_dw210x_table),
1262 .rc_interval = 150, 1262 .rc_interval = 150,
1263 .rc_query = dw2102_rc_query, 1263 .rc_query = dw2102_rc_query,
1264 }, 1264 },
@@ -1310,8 +1310,8 @@ static struct dvb_usb_device_properties dw2104_properties = {
1310 1310
1311 .i2c_algo = &dw2104_i2c_algo, 1311 .i2c_algo = &dw2104_i2c_algo,
1312 .rc.legacy = { 1312 .rc.legacy = {
1313 .rc_key_map = ir_codes_dw210x_table, 1313 .rc_map_table = rc_map_dw210x_table,
1314 .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), 1314 .rc_map_size = ARRAY_SIZE(rc_map_dw210x_table),
1315 .rc_interval = 150, 1315 .rc_interval = 150,
1316 .rc_query = dw2102_rc_query, 1316 .rc_query = dw2102_rc_query,
1317 }, 1317 },
@@ -1359,8 +1359,8 @@ static struct dvb_usb_device_properties dw3101_properties = {
1359 1359
1360 .i2c_algo = &dw3101_i2c_algo, 1360 .i2c_algo = &dw3101_i2c_algo,
1361 .rc.legacy = { 1361 .rc.legacy = {
1362 .rc_key_map = ir_codes_dw210x_table, 1362 .rc_map_table = rc_map_dw210x_table,
1363 .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), 1363 .rc_map_size = ARRAY_SIZE(rc_map_dw210x_table),
1364 .rc_interval = 150, 1364 .rc_interval = 150,
1365 .rc_query = dw2102_rc_query, 1365 .rc_query = dw2102_rc_query,
1366 }, 1366 },
@@ -1404,8 +1404,8 @@ static struct dvb_usb_device_properties s6x0_properties = {
1404 1404
1405 .i2c_algo = &s6x0_i2c_algo, 1405 .i2c_algo = &s6x0_i2c_algo,
1406 .rc.legacy = { 1406 .rc.legacy = {
1407 .rc_key_map = ir_codes_tevii_table, 1407 .rc_map_table = rc_map_tevii_table,
1408 .rc_key_map_size = ARRAY_SIZE(ir_codes_tevii_table), 1408 .rc_map_size = ARRAY_SIZE(rc_map_tevii_table),
1409 .rc_interval = 150, 1409 .rc_interval = 150,
1410 .rc_query = dw2102_rc_query, 1410 .rc_query = dw2102_rc_query,
1411 }, 1411 },
@@ -1468,8 +1468,8 @@ static int dw2102_probe(struct usb_interface *intf,
1468 /* fill only different fields */ 1468 /* fill only different fields */
1469 p7500->firmware = "dvb-usb-p7500.fw"; 1469 p7500->firmware = "dvb-usb-p7500.fw";
1470 p7500->devices[0] = d7500; 1470 p7500->devices[0] = d7500;
1471 p7500->rc.legacy.rc_key_map = ir_codes_tbs_table; 1471 p7500->rc.legacy.rc_map_table = rc_map_tbs_table;
1472 p7500->rc.legacy.rc_key_map_size = ARRAY_SIZE(ir_codes_tbs_table); 1472 p7500->rc.legacy.rc_map_size = ARRAY_SIZE(rc_map_tbs_table);
1473 p7500->adapter->frontend_attach = prof_7500_frontend_attach; 1473 p7500->adapter->frontend_attach = prof_7500_frontend_attach;
1474 1474
1475 if (0 == dvb_usb_device_init(intf, &dw2102_properties, 1475 if (0 == dvb_usb_device_init(intf, &dw2102_properties,