diff options
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
21 files changed, 175 insertions, 175 deletions
diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a800.c index a5c363727133..53b93a4b6f8a 100644 --- a/drivers/media/dvb/dvb-usb/a800.c +++ b/drivers/media/dvb/dvb-usb/a800.c @@ -37,7 +37,7 @@ static int a800_identify_state(struct usb_device *udev, struct dvb_usb_device_pr return 0; } -static struct ir_scancode ir_codes_a800_table[] = { +static struct rc_map_table rc_map_a800_table[] = { { 0x0201, KEY_PROG1 }, /* SOURCE */ { 0x0200, KEY_POWER }, /* POWER */ { 0x0205, KEY_1 }, /* 1 */ @@ -148,8 +148,8 @@ static struct dvb_usb_device_properties a800_properties = { .rc.legacy = { .rc_interval = DEFAULT_RC_INTERVAL, - .rc_key_map = ir_codes_a800_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_a800_table), + .rc_map_table = rc_map_a800_table, + .rc_map_size = ARRAY_SIZE(rc_map_a800_table), .rc_query = a800_rc_query, }, diff --git a/drivers/media/dvb/dvb-usb/af9005-remote.c b/drivers/media/dvb/dvb-usb/af9005-remote.c index 696207fe37ec..c3bc64ed405c 100644 --- a/drivers/media/dvb/dvb-usb/af9005-remote.c +++ b/drivers/media/dvb/dvb-usb/af9005-remote.c @@ -33,7 +33,7 @@ MODULE_PARM_DESC(debug, #define deb_decode(args...) dprintk(dvb_usb_af9005_remote_debug,0x01,args) -struct ir_scancode ir_codes_af9005_table[] = { +struct rc_map_table rc_map_af9005_table[] = { {0x01b7, KEY_POWER}, {0x01a7, KEY_VOLUMEUP}, @@ -74,7 +74,7 @@ struct ir_scancode ir_codes_af9005_table[] = { {0x00d5, KEY_GOTO}, /* marked jump on the remote */ }; -int ir_codes_af9005_table_size = ARRAY_SIZE(ir_codes_af9005_table); +int rc_map_af9005_table_size = ARRAY_SIZE(rc_map_af9005_table); static int repeatable_keys[] = { KEY_VOLUMEUP, @@ -130,10 +130,10 @@ int af9005_rc_decode(struct dvb_usb_device *d, u8 * data, int len, u32 * event, deb_decode("code != inverted code\n"); return 0; } - for (i = 0; i < ir_codes_af9005_table_size; i++) { - if (rc5_custom(&ir_codes_af9005_table[i]) == cust - && rc5_data(&ir_codes_af9005_table[i]) == dat) { - *event = ir_codes_af9005_table[i].keycode; + for (i = 0; i < rc_map_af9005_table_size; i++) { + if (rc5_custom(&rc_map_af9005_table[i]) == cust + && rc5_data(&rc_map_af9005_table[i]) == dat) { + *event = rc_map_af9005_table[i].keycode; *state = REMOTE_KEY_PRESSED; deb_decode ("key pressed, event %x\n", *event); @@ -146,8 +146,8 @@ int af9005_rc_decode(struct dvb_usb_device *d, u8 * data, int len, u32 * event, return 0; } -EXPORT_SYMBOL(ir_codes_af9005_table); -EXPORT_SYMBOL(ir_codes_af9005_table_size); +EXPORT_SYMBOL(rc_map_af9005_table); +EXPORT_SYMBOL(rc_map_af9005_table_size); EXPORT_SYMBOL(af9005_rc_decode); MODULE_AUTHOR("Luca Olivetti <luca@ventoso.org>"); diff --git a/drivers/media/dvb/dvb-usb/af9005.c b/drivers/media/dvb/dvb-usb/af9005.c index 8ecba8848bcf..51f6439dcfd5 100644 --- a/drivers/media/dvb/dvb-usb/af9005.c +++ b/drivers/media/dvb/dvb-usb/af9005.c @@ -1027,8 +1027,8 @@ static struct dvb_usb_device_properties af9005_properties = { .rc.legacy = { .rc_interval = 200, - .rc_key_map = NULL, - .rc_key_map_size = 0, + .rc_map_table = NULL, + .rc_map_size = 0, .rc_query = af9005_rc_query, }, @@ -1070,14 +1070,14 @@ static int __init af9005_usb_module_init(void) return result; } rc_decode = symbol_request(af9005_rc_decode); - rc_keys = symbol_request(ir_codes_af9005_table); - rc_keys_size = symbol_request(ir_codes_af9005_table_size); + rc_keys = symbol_request(rc_map_af9005_table); + rc_keys_size = symbol_request(rc_map_af9005_table_size); if (rc_decode == NULL || rc_keys == NULL || rc_keys_size == NULL) { err("af9005_rc_decode function not found, disabling remote"); af9005_properties.rc.legacy.rc_query = NULL; } else { - af9005_properties.rc.legacy.rc_key_map = rc_keys; - af9005_properties.rc.legacy.rc_key_map_size = *rc_keys_size; + af9005_properties.rc.legacy.rc_map_table = rc_keys; + af9005_properties.rc.legacy.rc_map_size = *rc_keys_size; } return 0; @@ -1089,9 +1089,9 @@ static void __exit af9005_usb_module_exit(void) if (rc_decode != NULL) symbol_put(af9005_rc_decode); if (rc_keys != NULL) - symbol_put(ir_codes_af9005_table); + symbol_put(rc_map_af9005_table); if (rc_keys_size != NULL) - symbol_put(ir_codes_af9005_table_size); + symbol_put(rc_map_af9005_table_size); /* deregister this driver from the USB subsystem */ usb_deregister(&af9005_usb_driver); } diff --git a/drivers/media/dvb/dvb-usb/af9005.h b/drivers/media/dvb/dvb-usb/af9005.h index 3c1fbd1c5d60..c71c77bd7f4b 100644 --- a/drivers/media/dvb/dvb-usb/af9005.h +++ b/drivers/media/dvb/dvb-usb/af9005.h @@ -3490,7 +3490,7 @@ extern u8 regmask[8]; /* remote control decoder */ extern int af9005_rc_decode(struct dvb_usb_device *d, u8 * data, int len, u32 * event, int *state); -extern struct ir_scancode ir_codes_af9005_table[]; -extern int ir_codes_af9005_table_size; +extern struct rc_map_table rc_map_af9005_table[]; +extern int rc_map_af9005_table_size; #endif diff --git a/drivers/media/dvb/dvb-usb/az6027.c b/drivers/media/dvb/dvb-usb/az6027.c index 62c58288469f..9a7837fcfd7f 100644 --- a/drivers/media/dvb/dvb-usb/az6027.c +++ b/drivers/media/dvb/dvb-usb/az6027.c @@ -386,7 +386,7 @@ static int az6027_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) } /* keys for the enclosed remote control */ -static struct ir_scancode ir_codes_az6027_table[] = { +static struct rc_map_table rc_map_az6027_table[] = { { 0x01, KEY_1 }, { 0x02, KEY_2 }, }; @@ -1126,8 +1126,8 @@ static struct dvb_usb_device_properties az6027_properties = { .read_mac_address = az6027_read_mac_addr, */ .rc.legacy = { - .rc_key_map = ir_codes_az6027_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_az6027_table), + .rc_map_table = rc_map_az6027_table, + .rc_map_size = ARRAY_SIZE(rc_map_az6027_table), .rc_interval = 400, .rc_query = az6027_rc_query, }, diff --git a/drivers/media/dvb/dvb-usb/cinergyT2-core.c b/drivers/media/dvb/dvb-usb/cinergyT2-core.c index 4f5aa83fc1fc..16f2ce2bc15a 100644 --- a/drivers/media/dvb/dvb-usb/cinergyT2-core.c +++ b/drivers/media/dvb/dvb-usb/cinergyT2-core.c @@ -84,7 +84,7 @@ static int cinergyt2_frontend_attach(struct dvb_usb_adapter *adap) return 0; } -static struct ir_scancode ir_codes_cinergyt2_table[] = { +static struct rc_map_table rc_map_cinergyt2_table[] = { { 0x0401, KEY_POWER }, { 0x0402, KEY_1 }, { 0x0403, KEY_2 }, @@ -219,8 +219,8 @@ static struct dvb_usb_device_properties cinergyt2_properties = { .rc.legacy = { .rc_interval = 50, - .rc_key_map = ir_codes_cinergyt2_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_cinergyt2_table), + .rc_map_table = rc_map_cinergyt2_table, + .rc_map_size = ARRAY_SIZE(rc_map_cinergyt2_table), .rc_query = cinergyt2_rc_query, }, 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( static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) { - struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; + struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table; u8 ircode[4]; int i; @@ -394,7 +394,7 @@ static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) *event = 0; *state = REMOTE_NO_KEY_PRESSED; - for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { + for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) { if (rc5_custom(&keymap[i]) == ircode[2] && rc5_data(&keymap[i]) == ircode[3]) { *event = keymap[i].keycode; @@ -410,7 +410,7 @@ static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event, int *state) { - struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; + struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table; u8 ircode[4]; int i; 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, if (cxusb_i2c_xfer(&d->i2c_adap, &msg, 1) != 1) return 0; - for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { + for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) { if (rc5_custom(&keymap[i]) == ircode[1] && rc5_data(&keymap[i]) == ircode[2]) { *event = keymap[i].keycode; @@ -438,7 +438,7 @@ static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event, static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) { - struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; + struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table; u8 ircode[2]; int i; @@ -448,7 +448,7 @@ static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event, if (cxusb_ctrl_msg(d, 0x10, NULL, 0, ircode, 2) < 0) return 0; - for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { + for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) { if (rc5_custom(&keymap[i]) == ircode[0] && rc5_data(&keymap[i]) == ircode[1]) { *event = keymap[i].keycode; @@ -461,7 +461,7 @@ static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event, return 0; } -static struct ir_scancode ir_codes_dvico_mce_table[] = { +static struct rc_map_table rc_map_dvico_mce_table[] = { { 0xfe02, KEY_TV }, { 0xfe0e, KEY_MP3 }, { 0xfe1a, KEY_DVD }, @@ -509,7 +509,7 @@ static struct ir_scancode ir_codes_dvico_mce_table[] = { { 0xfe4e, KEY_POWER }, }; -static struct ir_scancode ir_codes_dvico_portable_table[] = { +static struct rc_map_table rc_map_dvico_portable_table[] = { { 0xfc02, KEY_SETUP }, /* Profile */ { 0xfc43, KEY_POWER2 }, { 0xfc06, KEY_EPG }, @@ -548,7 +548,7 @@ static struct ir_scancode ir_codes_dvico_portable_table[] = { { 0xfc00, KEY_UNKNOWN }, /* HD */ }; -static struct ir_scancode ir_codes_d680_dmb_table[] = { +static struct rc_map_table rc_map_d680_dmb_table[] = { { 0x0038, KEY_UNKNOWN }, /* TV/AV */ { 0x080c, KEY_ZOOM }, { 0x0800, KEY_0 }, @@ -923,7 +923,7 @@ static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap) return -EIO; /* try to determine if there is no IR decoder on the I2C bus */ - for (i = 0; adap->dev->props.rc.legacy.rc_key_map != NULL && i < 5; i++) { + for (i = 0; adap->dev->props.rc.legacy.rc_map_table != NULL && i < 5; i++) { msleep(20); if (cxusb_i2c_xfer(&adap->dev->i2c_adap, &msg, 1) != 1) goto no_IR; @@ -931,7 +931,7 @@ static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap) continue; if (ircode[2] + ircode[3] != 0xff) { no_IR: - adap->dev->props.rc.legacy.rc_key_map = NULL; + adap->dev->props.rc.legacy.rc_map_table = NULL; info("No IR receiver detected on this device."); break; } @@ -1453,8 +1453,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_lgh064f_properties = { .rc.legacy = { .rc_interval = 100, - .rc_key_map = ir_codes_dvico_portable_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), + .rc_map_table = rc_map_dvico_portable_table, + .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), .rc_query = cxusb_rc_query, }, @@ -1506,8 +1506,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_dee1601_properties = { .rc.legacy = { .rc_interval = 150, - .rc_key_map = ir_codes_dvico_mce_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table), + .rc_map_table = rc_map_dvico_mce_table, + .rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table), .rc_query = cxusb_rc_query, }, @@ -1567,8 +1567,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties = { .rc.legacy = { .rc_interval = 100, - .rc_key_map = ir_codes_dvico_portable_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), + .rc_map_table = rc_map_dvico_portable_table, + .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), .rc_query = cxusb_rc_query, }, @@ -1619,8 +1619,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties = { .rc.legacy = { .rc_interval = 100, - .rc_key_map = ir_codes_dvico_portable_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), + .rc_map_table = rc_map_dvico_portable_table, + .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), .rc_query = cxusb_rc_query, }, @@ -1670,8 +1670,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties = { .rc.legacy = { .rc_interval = 100, - .rc_key_map = ir_codes_dvico_mce_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table), + .rc_map_table = rc_map_dvico_mce_table, + .rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table), .rc_query = cxusb_bluebird2_rc_query, }, @@ -1720,8 +1720,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_properties = { .rc.legacy = { .rc_interval = 100, - .rc_key_map = ir_codes_dvico_portable_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), + .rc_map_table = rc_map_dvico_portable_table, + .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), .rc_query = cxusb_bluebird2_rc_query, }, @@ -1772,8 +1772,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_needsfirmware_prope .rc.legacy = { .rc_interval = 100, - .rc_key_map = ir_codes_dvico_portable_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table), + .rc_map_table = rc_map_dvico_portable_table, + .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), .rc_query = cxusb_rc_query, }, @@ -1865,8 +1865,8 @@ struct dvb_usb_device_properties cxusb_bluebird_dualdig4_rev2_properties = { .rc.legacy = { .rc_interval = 100, - .rc_key_map = ir_codes_dvico_mce_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table), + .rc_map_table = rc_map_dvico_mce_table, + .rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table), .rc_query = cxusb_rc_query, }, @@ -1915,8 +1915,8 @@ static struct dvb_usb_device_properties cxusb_d680_dmb_properties = { .rc.legacy = { .rc_interval = 100, - .rc_key_map = ir_codes_d680_dmb_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_d680_dmb_table), + .rc_map_table = rc_map_d680_dmb_table, + .rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table), .rc_query = cxusb_d680_dmb_rc_query, }, @@ -1966,8 +1966,8 @@ static struct dvb_usb_device_properties cxusb_mygica_d689_properties = { .rc.legacy = { .rc_interval = 100, - .rc_key_map = ir_codes_d680_dmb_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_d680_dmb_table), + .rc_map_table = rc_map_d680_dmb_table, + .rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table), .rc_query = cxusb_d680_dmb_rc_query, }, diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c index ba991aa21aff..956f7ae2e510 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-common.c +++ b/drivers/media/dvb/dvb-usb/dibusb-common.c @@ -327,7 +327,7 @@ EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach); /* * common remote control stuff */ -struct ir_scancode ir_codes_dibusb_table[] = { +struct rc_map_table rc_map_dibusb_table[] = { /* Key codes for the little Artec T1/Twinhan/HAMA/ remote. */ { 0x0016, KEY_POWER }, { 0x0010, KEY_MUTE }, @@ -456,7 +456,7 @@ struct ir_scancode ir_codes_dibusb_table[] = { { 0x804e, KEY_ENTER }, { 0x804f, KEY_VOLUMEDOWN }, }; -EXPORT_SYMBOL(ir_codes_dibusb_table); +EXPORT_SYMBOL(rc_map_dibusb_table); int dibusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) { diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c b/drivers/media/dvb/dvb-usb/dibusb-mb.c index 8e3c0d2cce16..04d91bdd3562 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-mb.c +++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c @@ -213,8 +213,8 @@ static struct dvb_usb_device_properties dibusb1_1_properties = { .rc.legacy = { .rc_interval = DEFAULT_RC_INTERVAL, - .rc_key_map = ir_codes_dibusb_table, - .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ + .rc_map_table = rc_map_dibusb_table, + .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ .rc_query = dibusb_rc_query, }, @@ -299,8 +299,8 @@ static struct dvb_usb_device_properties dibusb1_1_an2235_properties = { .rc.legacy = { .rc_interval = DEFAULT_RC_INTERVAL, - .rc_key_map = ir_codes_dibusb_table, - .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ + .rc_map_table = rc_map_dibusb_table, + .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ .rc_query = dibusb_rc_query, }, @@ -365,8 +365,8 @@ static struct dvb_usb_device_properties dibusb2_0b_properties = { .rc.legacy = { .rc_interval = DEFAULT_RC_INTERVAL, - .rc_key_map = ir_codes_dibusb_table, - .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ + .rc_map_table = rc_map_dibusb_table, + .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ .rc_query = dibusb_rc_query, }, @@ -424,8 +424,8 @@ static struct dvb_usb_device_properties artec_t1_usb2_properties = { .rc.legacy = { .rc_interval = DEFAULT_RC_INTERVAL, - .rc_key_map = ir_codes_dibusb_table, - .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ + .rc_map_table = rc_map_dibusb_table, + .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ .rc_query = dibusb_rc_query, }, diff --git a/drivers/media/dvb/dvb-usb/dibusb-mc.c b/drivers/media/dvb/dvb-usb/dibusb-mc.c index 1cbc41cb4e8f..c1d9094b61e5 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-mc.c +++ b/drivers/media/dvb/dvb-usb/dibusb-mc.c @@ -83,8 +83,8 @@ static struct dvb_usb_device_properties dibusb_mc_properties = { .rc.legacy = { .rc_interval = DEFAULT_RC_INTERVAL, - .rc_key_map = ir_codes_dibusb_table, - .rc_key_map_size = 111, /* FIXME */ + .rc_map_table = rc_map_dibusb_table, + .rc_map_size = 111, /* FIXME */ .rc_query = dibusb_rc_query, }, diff --git a/drivers/media/dvb/dvb-usb/dibusb.h b/drivers/media/dvb/dvb-usb/dibusb.h index 61a6bf389472..e47c321b3ffc 100644 --- a/drivers/media/dvb/dvb-usb/dibusb.h +++ b/drivers/media/dvb/dvb-usb/dibusb.h @@ -124,7 +124,7 @@ extern int dibusb2_0_power_ctrl(struct dvb_usb_device *, int); #define DEFAULT_RC_INTERVAL 150 //#define DEFAULT_RC_INTERVAL 100000 -extern struct ir_scancode ir_codes_dibusb_table[]; +extern struct rc_map_table rc_map_dibusb_table[]; extern int dibusb_rc_query(struct dvb_usb_device *, u32 *, int *); extern int dibusb_read_eeprom_byte(struct dvb_usb_device *, u8, u8 *); diff --git a/drivers/media/dvb/dvb-usb/digitv.c b/drivers/media/dvb/dvb-usb/digitv.c index 13d006bb19db..f2dbce7edb3b 100644 --- a/drivers/media/dvb/dvb-usb/digitv.c +++ b/drivers/media/dvb/dvb-usb/digitv.c @@ -161,7 +161,7 @@ static int digitv_tuner_attach(struct dvb_usb_adapter *adap) return 0; } -static struct ir_scancode ir_codes_digitv_table[] = { +static struct rc_map_table rc_map_digitv_table[] = { { 0x5f55, KEY_0 }, { 0x6f55, KEY_1 }, { 0x9f55, KEY_2 }, @@ -237,10 +237,10 @@ static int digitv_rc_query(struct dvb_usb_device *d, u32 *event, int *state) /* if something is inside the buffer, simulate key press */ if (key[1] != 0) { - for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { - if (rc5_custom(&d->props.rc.legacy.rc_key_map[i]) == key[1] && - rc5_data(&d->props.rc.legacy.rc_key_map[i]) == key[2]) { - *event = d->props.rc.legacy.rc_key_map[i].keycode; + for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) { + if (rc5_custom(&d->props.rc.legacy.rc_map_table[i]) == key[1] && + rc5_data(&d->props.rc.legacy.rc_map_table[i]) == key[2]) { + *event = d->props.rc.legacy.rc_map_table[i].keycode; *state = REMOTE_KEY_PRESSED; return 0; } @@ -312,8 +312,8 @@ static struct dvb_usb_device_properties digitv_properties = { .rc.legacy = { .rc_interval = 1000, - .rc_key_map = ir_codes_digitv_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_digitv_table), + .rc_map_table = rc_map_digitv_table, + .rc_map_size = ARRAY_SIZE(rc_map_digitv_table), .rc_query = digitv_rc_query, }, diff --git a/drivers/media/dvb/dvb-usb/dtt200u.c b/drivers/media/dvb/dvb-usb/dtt200u.c index ca495e07f35c..ecd86eca2548 100644 --- a/drivers/media/dvb/dvb-usb/dtt200u.c +++ b/drivers/media/dvb/dvb-usb/dtt200u.c @@ -57,7 +57,7 @@ static int dtt200u_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, /* remote control */ /* key list for the tiny remote control (Yakumo, don't know about the others) */ -static struct ir_scancode ir_codes_dtt200u_table[] = { +static struct rc_map_table rc_map_dtt200u_table[] = { { 0x8001, KEY_MUTE }, { 0x8002, KEY_CHANNELDOWN }, { 0x8003, KEY_VOLUMEDOWN }, @@ -163,8 +163,8 @@ static struct dvb_usb_device_properties dtt200u_properties = { .rc.legacy = { .rc_interval = 300, - .rc_key_map = ir_codes_dtt200u_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), + .rc_map_table = rc_map_dtt200u_table, + .rc_map_size = ARRAY_SIZE(rc_map_dtt200u_table), .rc_query = dtt200u_rc_query, }, @@ -210,8 +210,8 @@ static struct dvb_usb_device_properties wt220u_properties = { .rc.legacy = { .rc_interval = 300, - .rc_key_map = ir_codes_dtt200u_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), + .rc_map_table = rc_map_dtt200u_table, + .rc_map_size = ARRAY_SIZE(rc_map_dtt200u_table), .rc_query = dtt200u_rc_query, }, @@ -257,8 +257,8 @@ static struct dvb_usb_device_properties wt220u_fc_properties = { .rc.legacy = { .rc_interval = 300, - .rc_key_map = ir_codes_dtt200u_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), + .rc_map_table = rc_map_dtt200u_table, + .rc_map_size = ARRAY_SIZE(rc_map_dtt200u_table), .rc_query = dtt200u_rc_query, }, @@ -304,8 +304,8 @@ static struct dvb_usb_device_properties wt220u_zl0353_properties = { .rc.legacy = { .rc_interval = 300, - .rc_key_map = ir_codes_dtt200u_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_dtt200u_table), + .rc_map_table = rc_map_dtt200u_table, + .rc_map_size = ARRAY_SIZE(rc_map_dtt200u_table), .rc_query = dtt200u_rc_query, }, diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c index bbba149a2ceb..c6498f536dff 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c @@ -13,11 +13,11 @@ static int legacy_dvb_usb_getkeycode(struct input_dev *dev, { struct dvb_usb_device *d = input_get_drvdata(dev); - struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; + struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table; int i; /* See if we can match the raw key code. */ - for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) + for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) if (keymap[i].scancode == scancode) { *keycode = keymap[i].keycode; return 0; @@ -28,7 +28,7 @@ static int legacy_dvb_usb_getkeycode(struct input_dev *dev, * otherwise, input core won't let legacy_dvb_usb_setkeycode * to work */ - for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) + for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) if (keymap[i].keycode == KEY_RESERVED || keymap[i].keycode == KEY_UNKNOWN) { *keycode = KEY_RESERVED; @@ -43,18 +43,18 @@ static int legacy_dvb_usb_setkeycode(struct input_dev *dev, { struct dvb_usb_device *d = input_get_drvdata(dev); - struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; + struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table; int i; /* Search if it is replacing an existing keycode */ - for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) + for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) if (keymap[i].scancode == scancode) { keymap[i].keycode = keycode; return 0; } /* Search if is there a clean entry. If so, use it */ - for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) + for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) if (keymap[i].keycode == KEY_RESERVED || keymap[i].keycode == KEY_UNKNOWN) { keymap[i].scancode = scancode; @@ -175,11 +175,11 @@ static int legacy_dvb_usb_remote_init(struct dvb_usb_device *d) input_dev->setkeycode = legacy_dvb_usb_setkeycode; /* set the bits for the keys */ - deb_rc("key map size: %d\n", d->props.rc.legacy.rc_key_map_size); - for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { + deb_rc("key map size: %d\n", d->props.rc.legacy.rc_map_size); + for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) { deb_rc("setting bit for event %d item %d\n", - d->props.rc.legacy.rc_key_map[i].keycode, i); - set_bit(d->props.rc.legacy.rc_key_map[i].keycode, input_dev->keybit); + d->props.rc.legacy.rc_map_table[i].keycode, i); + set_bit(d->props.rc.legacy.rc_map_table[i].keycode, input_dev->keybit); } /* setting these two values to non-zero, we have to manage key repeats */ @@ -284,7 +284,7 @@ int dvb_usb_remote_init(struct dvb_usb_device *d) if (dvb_usb_disable_rc_polling) return 0; - if (d->props.rc.legacy.rc_key_map && d->props.rc.legacy.rc_query) + if (d->props.rc.legacy.rc_map_table && d->props.rc.legacy.rc_query) d->props.rc.mode = DVB_RC_LEGACY; else if (d->props.rc.core.rc_codes) d->props.rc.mode = DVB_RC_CORE; @@ -331,7 +331,7 @@ int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d, u8 keybuf[5], u32 *event, int *state) { int i; - struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; + struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table; *event = 0; *state = REMOTE_NO_KEY_PRESSED; switch (keybuf[0]) { @@ -344,7 +344,7 @@ int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d, break; } /* See if we can match the raw key code. */ - for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) + for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) if (rc5_custom(&keymap[i]) == keybuf[1] && rc5_data(&keymap[i]) == keybuf[3]) { *event = keymap[i].keycode; diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h index 95b1603d5be8..65fa9268e7f7 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb.h @@ -75,17 +75,17 @@ struct dvb_usb_device_description { struct usb_device_id *warm_ids[DVB_USB_ID_MAX_NUM]; }; -static inline u8 rc5_custom(struct ir_scancode *key) +static inline u8 rc5_custom(struct rc_map_table *key) { return (key->scancode >> 8) & 0xff; } -static inline u8 rc5_data(struct ir_scancode *key) +static inline u8 rc5_data(struct rc_map_table *key) { return key->scancode & 0xff; } -static inline u8 rc5_scan(struct ir_scancode *key) +static inline u8 rc5_scan(struct rc_map_table *key) { return key->scancode & 0xffff; } @@ -159,9 +159,9 @@ struct dvb_usb_adapter_properties { /** * struct dvb_rc_legacy - old properties of remote controller - * @rc_key_map: a hard-wired array of struct ir_scancode (NULL to disable + * @rc_map_table: a hard-wired array of struct rc_map_table (NULL to disable * remote control handling). - * @rc_key_map_size: number of items in @rc_key_map. + * @rc_map_size: number of items in @rc_map_table. * @rc_query: called to query an event event. * @rc_interval: time in ms between two queries. */ @@ -170,8 +170,8 @@ struct dvb_rc_legacy { #define REMOTE_NO_KEY_PRESSED 0x00 #define REMOTE_KEY_PRESSED 0x01 #define REMOTE_KEY_REPEAT 0x02 - struct ir_scancode *rc_key_map; - int rc_key_map_size; + struct rc_map_table *rc_map_table; + int rc_map_size; int (*rc_query) (struct dvb_usb_device *, u32 *, int *); int rc_interval; }; 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 @@ "Please see linux/Documentation/dvb/ for more details " \ "on firmware-problems." -struct ir_codes_dvb_usb_table_table { - struct ir_scancode *rc_keys; +struct rc_map_dvb_usb_table_table { + struct rc_map_table *rc_keys; int rc_keys_size; }; @@ -948,7 +948,7 @@ static int dw3101_tuner_attach(struct dvb_usb_adapter *adap) return 0; } -static struct ir_scancode ir_codes_dw210x_table[] = { +static struct rc_map_table rc_map_dw210x_table[] = { { 0xf80a, KEY_Q }, /*power*/ { 0xf80c, KEY_M }, /*mute*/ { 0xf811, KEY_1 }, @@ -982,7 +982,7 @@ static struct ir_scancode ir_codes_dw210x_table[] = { { 0xf81b, KEY_B }, /*recall*/ }; -static struct ir_scancode ir_codes_tevii_table[] = { +static struct rc_map_table rc_map_tevii_table[] = { { 0xf80a, KEY_POWER }, { 0xf80c, KEY_MUTE }, { 0xf811, KEY_1 }, @@ -1032,7 +1032,7 @@ static struct ir_scancode ir_codes_tevii_table[] = { { 0xf858, KEY_SWITCHVIDEOMODE }, }; -static struct ir_scancode ir_codes_tbs_table[] = { +static struct rc_map_table rc_map_tbs_table[] = { { 0xf884, KEY_POWER }, { 0xf894, KEY_MUTE }, { 0xf887, KEY_1 }, @@ -1067,16 +1067,16 @@ static struct ir_scancode ir_codes_tbs_table[] = { { 0xf89b, KEY_MODE } }; -static struct ir_codes_dvb_usb_table_table keys_tables[] = { - { ir_codes_dw210x_table, ARRAY_SIZE(ir_codes_dw210x_table) }, - { ir_codes_tevii_table, ARRAY_SIZE(ir_codes_tevii_table) }, - { ir_codes_tbs_table, ARRAY_SIZE(ir_codes_tbs_table) }, +static struct rc_map_dvb_usb_table_table keys_tables[] = { + { rc_map_dw210x_table, ARRAY_SIZE(rc_map_dw210x_table) }, + { rc_map_tevii_table, ARRAY_SIZE(rc_map_tevii_table) }, + { rc_map_tbs_table, ARRAY_SIZE(rc_map_tbs_table) }, }; static int dw2102_rc_query(struct dvb_usb_device *d, u32 *event, int *state) { - struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; - int keymap_size = d->props.rc.legacy.rc_key_map_size; + struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table; + int keymap_size = d->props.rc.legacy.rc_map_size; u8 key[2]; struct i2c_msg msg = { .addr = DW2102_RC_QUERY, @@ -1185,14 +1185,14 @@ static int dw2102_load_firmware(struct usb_device *dev, /* init registers */ switch (dev->descriptor.idProduct) { case USB_PID_PROF_1100: - s6x0_properties.rc.legacy.rc_key_map = ir_codes_tbs_table; - s6x0_properties.rc.legacy.rc_key_map_size = - ARRAY_SIZE(ir_codes_tbs_table); + s6x0_properties.rc.legacy.rc_map_table = rc_map_tbs_table; + s6x0_properties.rc.legacy.rc_map_size = + ARRAY_SIZE(rc_map_tbs_table); break; case USB_PID_TEVII_S650: - dw2104_properties.rc.legacy.rc_key_map = ir_codes_tevii_table; - dw2104_properties.rc.legacy.rc_key_map_size = - ARRAY_SIZE(ir_codes_tevii_table); + dw2104_properties.rc.legacy.rc_map_table = rc_map_tevii_table; + dw2104_properties.rc.legacy.rc_map_size = + ARRAY_SIZE(rc_map_tevii_table); case USB_PID_DW2104: reset = 1; dw210x_op_rw(dev, 0xc4, 0x0000, 0, &reset, 1, @@ -1257,8 +1257,8 @@ static struct dvb_usb_device_properties dw2102_properties = { .i2c_algo = &dw2102_serit_i2c_algo, .rc.legacy = { - .rc_key_map = ir_codes_dw210x_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), + .rc_map_table = rc_map_dw210x_table, + .rc_map_size = ARRAY_SIZE(rc_map_dw210x_table), .rc_interval = 150, .rc_query = dw2102_rc_query, }, @@ -1310,8 +1310,8 @@ static struct dvb_usb_device_properties dw2104_properties = { .i2c_algo = &dw2104_i2c_algo, .rc.legacy = { - .rc_key_map = ir_codes_dw210x_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), + .rc_map_table = rc_map_dw210x_table, + .rc_map_size = ARRAY_SIZE(rc_map_dw210x_table), .rc_interval = 150, .rc_query = dw2102_rc_query, }, @@ -1359,8 +1359,8 @@ static struct dvb_usb_device_properties dw3101_properties = { .i2c_algo = &dw3101_i2c_algo, .rc.legacy = { - .rc_key_map = ir_codes_dw210x_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_dw210x_table), + .rc_map_table = rc_map_dw210x_table, + .rc_map_size = ARRAY_SIZE(rc_map_dw210x_table), .rc_interval = 150, .rc_query = dw2102_rc_query, }, @@ -1404,8 +1404,8 @@ static struct dvb_usb_device_properties s6x0_properties = { .i2c_algo = &s6x0_i2c_algo, .rc.legacy = { - .rc_key_map = ir_codes_tevii_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_tevii_table), + .rc_map_table = rc_map_tevii_table, + .rc_map_size = ARRAY_SIZE(rc_map_tevii_table), .rc_interval = 150, .rc_query = dw2102_rc_query, }, @@ -1468,8 +1468,8 @@ static int dw2102_probe(struct usb_interface *intf, /* fill only different fields */ p7500->firmware = "dvb-usb-p7500.fw"; p7500->devices[0] = d7500; - p7500->rc.legacy.rc_key_map = ir_codes_tbs_table; - p7500->rc.legacy.rc_key_map_size = ARRAY_SIZE(ir_codes_tbs_table); + p7500->rc.legacy.rc_map_table = rc_map_tbs_table; + p7500->rc.legacy.rc_map_size = ARRAY_SIZE(rc_map_tbs_table); p7500->adapter->frontend_attach = prof_7500_frontend_attach; if (0 == dvb_usb_device_init(intf, &dw2102_properties, diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c index bdef1a18b664..da9dc91ce910 100644 --- a/drivers/media/dvb/dvb-usb/m920x.c +++ b/drivers/media/dvb/dvb-usb/m920x.c @@ -142,9 +142,9 @@ static int m920x_rc_query(struct dvb_usb_device *d, u32 *event, int *state) if ((ret = m920x_read(d->udev, M9206_CORE, 0x0, M9206_RC_KEY, rc_state + 1, 1)) != 0) goto unlock; - for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) - if (rc5_data(&d->props.rc.legacy.rc_key_map[i]) == rc_state[1]) { - *event = d->props.rc.legacy.rc_key_map[i].keycode; + for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) + if (rc5_data(&d->props.rc.legacy.rc_map_table[i]) == rc_state[1]) { + *event = d->props.rc.legacy.rc_map_table[i].keycode; switch(rc_state[0]) { case 0x80: @@ -589,7 +589,7 @@ static struct m920x_inits pinnacle310e_init[] = { }; /* ir keymaps */ -static struct ir_scancode ir_codes_megasky_table[] = { +static struct rc_map_table rc_map_megasky_table[] = { { 0x0012, KEY_POWER }, { 0x001e, KEY_CYCLEWINDOWS }, /* min/max */ { 0x0002, KEY_CHANNELUP }, @@ -608,7 +608,7 @@ static struct ir_scancode ir_codes_megasky_table[] = { { 0x000e, KEY_COFFEE }, /* "MTS" */ }; -static struct ir_scancode ir_codes_tvwalkertwin_table[] = { +static struct rc_map_table rc_map_tvwalkertwin_table[] = { { 0x0001, KEY_ZOOM }, /* Full Screen */ { 0x0002, KEY_CAMERA }, /* snapshot */ { 0x0003, KEY_MUTE }, @@ -628,7 +628,7 @@ static struct ir_scancode ir_codes_tvwalkertwin_table[] = { { 0x001e, KEY_VOLUMEUP }, }; -static struct ir_scancode ir_codes_pinnacle310e_table[] = { +static struct rc_map_table rc_map_pinnacle310e_table[] = { { 0x16, KEY_POWER }, { 0x17, KEY_FAVORITES }, { 0x0f, KEY_TEXT }, @@ -786,8 +786,8 @@ static struct dvb_usb_device_properties megasky_properties = { .rc.legacy = { .rc_interval = 100, - .rc_key_map = ir_codes_megasky_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_megasky_table), + .rc_map_table = rc_map_megasky_table, + .rc_map_size = ARRAY_SIZE(rc_map_megasky_table), .rc_query = m920x_rc_query, }, @@ -889,8 +889,8 @@ static struct dvb_usb_device_properties tvwalkertwin_properties = { .rc.legacy = { .rc_interval = 100, - .rc_key_map = ir_codes_tvwalkertwin_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_tvwalkertwin_table), + .rc_map_table = rc_map_tvwalkertwin_table, + .rc_map_size = ARRAY_SIZE(rc_map_tvwalkertwin_table), .rc_query = m920x_rc_query, }, @@ -998,8 +998,8 @@ static struct dvb_usb_device_properties pinnacle_pctv310e_properties = { .rc.legacy = { .rc_interval = 100, - .rc_key_map = ir_codes_pinnacle310e_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_pinnacle310e_table), + .rc_map_table = rc_map_pinnacle310e_table, + .rc_map_size = ARRAY_SIZE(rc_map_pinnacle310e_table), .rc_query = m920x_rc_query, }, diff --git a/drivers/media/dvb/dvb-usb/nova-t-usb2.c b/drivers/media/dvb/dvb-usb/nova-t-usb2.c index 181f36a12e2a..9d3cd2de46fc 100644 --- a/drivers/media/dvb/dvb-usb/nova-t-usb2.c +++ b/drivers/media/dvb/dvb-usb/nova-t-usb2.c @@ -21,7 +21,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); #define deb_ee(args...) dprintk(debug,0x02,args) /* Hauppauge NOVA-T USB2 keys */ -static struct ir_scancode ir_codes_haupp_table[] = { +static struct rc_map_table rc_map_haupp_table[] = { { 0x1e00, KEY_0 }, { 0x1e01, KEY_1 }, { 0x1e02, KEY_2 }, @@ -91,14 +91,14 @@ static int nova_t_rc_query(struct dvb_usb_device *d, u32 *event, int *state) 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); - for (i = 0; i < ARRAY_SIZE(ir_codes_haupp_table); i++) { - if (rc5_data(&ir_codes_haupp_table[i]) == data && - rc5_custom(&ir_codes_haupp_table[i]) == custom) { + for (i = 0; i < ARRAY_SIZE(rc_map_haupp_table); i++) { + if (rc5_data(&rc_map_haupp_table[i]) == data && + rc5_custom(&rc_map_haupp_table[i]) == custom) { - deb_rc("c: %x, d: %x\n", rc5_data(&ir_codes_haupp_table[i]), - rc5_custom(&ir_codes_haupp_table[i])); + deb_rc("c: %x, d: %x\n", rc5_data(&rc_map_haupp_table[i]), + rc5_custom(&rc_map_haupp_table[i])); - *event = ir_codes_haupp_table[i].keycode; + *event = rc_map_haupp_table[i].keycode; *state = REMOTE_KEY_PRESSED; if (st->old_toggle == toggle) { if (st->last_repeat_count++ < 2) @@ -197,8 +197,8 @@ static struct dvb_usb_device_properties nova_t_properties = { .rc.legacy = { .rc_interval = 100, - .rc_key_map = ir_codes_haupp_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_haupp_table), + .rc_map_table = rc_map_haupp_table, + .rc_map_size = ARRAY_SIZE(rc_map_haupp_table), .rc_query = nova_t_rc_query, }, diff --git a/drivers/media/dvb/dvb-usb/opera1.c b/drivers/media/dvb/dvb-usb/opera1.c index f896337b4535..1f1b7d6980a5 100644 --- a/drivers/media/dvb/dvb-usb/opera1.c +++ b/drivers/media/dvb/dvb-usb/opera1.c @@ -35,7 +35,7 @@ struct opera1_state { u32 last_key_pressed; }; -struct ir_codes_opera_table { +struct rc_map_opera_table { u32 keycode; u32 event; }; @@ -331,7 +331,7 @@ static int opera1_pid_filter_control(struct dvb_usb_adapter *adap, int onoff) return 0; } -static struct ir_scancode ir_codes_opera1_table[] = { +static struct rc_map_table rc_map_opera1_table[] = { {0x5fa0, KEY_1}, {0x51af, KEY_2}, {0x5da2, KEY_3}, @@ -404,12 +404,12 @@ static int opera1_rc_query(struct dvb_usb_device *dev, u32 * event, int *state) send_key = (send_key & 0xffff) | 0x0100; - for (i = 0; i < ARRAY_SIZE(ir_codes_opera1_table); i++) { - if (rc5_scan(&ir_codes_opera1_table[i]) == (send_key & 0xffff)) { + for (i = 0; i < ARRAY_SIZE(rc_map_opera1_table); i++) { + if (rc5_scan(&rc_map_opera1_table[i]) == (send_key & 0xffff)) { *state = REMOTE_KEY_PRESSED; - *event = ir_codes_opera1_table[i].keycode; + *event = rc_map_opera1_table[i].keycode; opst->last_key_pressed = - ir_codes_opera1_table[i].keycode; + rc_map_opera1_table[i].keycode; break; } opst->last_key_pressed = 0; @@ -497,8 +497,8 @@ static struct dvb_usb_device_properties opera1_properties = { .i2c_algo = &opera1_i2c_algo, .rc.legacy = { - .rc_key_map = ir_codes_opera1_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_opera1_table), + .rc_map_table = rc_map_opera1_table, + .rc_map_size = ARRAY_SIZE(rc_map_opera1_table), .rc_interval = 200, .rc_query = opera1_rc_query, }, diff --git a/drivers/media/dvb/dvb-usb/vp702x.c b/drivers/media/dvb/dvb-usb/vp702x.c index 5c9f3275aaa0..7890e75600df 100644 --- a/drivers/media/dvb/dvb-usb/vp702x.c +++ b/drivers/media/dvb/dvb-usb/vp702x.c @@ -174,7 +174,7 @@ static int vp702x_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) } /* keys for the enclosed remote control */ -static struct ir_scancode ir_codes_vp702x_table[] = { +static struct rc_map_table rc_map_vp702x_table[] = { { 0x0001, KEY_1 }, { 0x0002, KEY_2 }, }; @@ -197,10 +197,10 @@ static int vp702x_rc_query(struct dvb_usb_device *d, u32 *event, int *state) return 0; } - for (i = 0; i < ARRAY_SIZE(ir_codes_vp702x_table); i++) - if (rc5_custom(&ir_codes_vp702x_table[i]) == key[1]) { + for (i = 0; i < ARRAY_SIZE(rc_map_vp702x_table); i++) + if (rc5_custom(&rc_map_vp702x_table[i]) == key[1]) { *state = REMOTE_KEY_PRESSED; - *event = ir_codes_vp702x_table[i].keycode; + *event = rc_map_vp702x_table[i].keycode; break; } return 0; @@ -284,8 +284,8 @@ static struct dvb_usb_device_properties vp702x_properties = { .read_mac_address = vp702x_read_mac_addr, .rc.legacy = { - .rc_key_map = ir_codes_vp702x_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_vp702x_table), + .rc_map_table = rc_map_vp702x_table, + .rc_map_size = ARRAY_SIZE(rc_map_vp702x_table), .rc_interval = 400, .rc_query = vp702x_rc_query, }, diff --git a/drivers/media/dvb/dvb-usb/vp7045.c b/drivers/media/dvb/dvb-usb/vp7045.c index f13791ca5994..ab0ab3c35e80 100644 --- a/drivers/media/dvb/dvb-usb/vp7045.c +++ b/drivers/media/dvb/dvb-usb/vp7045.c @@ -99,7 +99,7 @@ static int vp7045_power_ctrl(struct dvb_usb_device *d, int onoff) /* The keymapping struct. Somehow this should be loaded to the driver, but * currently it is hardcoded. */ -static struct ir_scancode ir_codes_vp7045_table[] = { +static struct rc_map_table rc_map_vp7045_table[] = { { 0x0016, KEY_POWER }, { 0x0010, KEY_MUTE }, { 0x0003, KEY_1 }, @@ -165,10 +165,10 @@ static int vp7045_rc_query(struct dvb_usb_device *d, u32 *event, int *state) return 0; } - for (i = 0; i < ARRAY_SIZE(ir_codes_vp7045_table); i++) - if (rc5_data(&ir_codes_vp7045_table[i]) == key) { + for (i = 0; i < ARRAY_SIZE(rc_map_vp7045_table); i++) + if (rc5_data(&rc_map_vp7045_table[i]) == key) { *state = REMOTE_KEY_PRESSED; - *event = ir_codes_vp7045_table[i].keycode; + *event = rc_map_vp7045_table[i].keycode; break; } return 0; @@ -261,8 +261,8 @@ static struct dvb_usb_device_properties vp7045_properties = { .rc.legacy = { .rc_interval = 400, - .rc_key_map = ir_codes_vp7045_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_vp7045_table), + .rc_map_table = rc_map_vp7045_table, + .rc_map_size = ARRAY_SIZE(rc_map_vp7045_table), .rc_query = vp7045_rc_query, }, |