Commit e27e971c authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

V4L/DVB: rename all *_rc_keys to ir_codes_*_nec_table



Several DVB drivers use a different name convention. As we're moving
the keytables, we need to use the same convention on all places.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent d705d2ab
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ static int a800_identify_state(struct usb_device *udev, struct dvb_usb_device_pr
	return 0;
}

static struct dvb_usb_rc_key a800_rc_keys[] = {
static struct dvb_usb_rc_key ir_codes_a800_table[] = {
	{ 0x0201, KEY_PROG1 },       /* SOURCE */
	{ 0x0200, KEY_POWER },       /* POWER */
	{ 0x0205, KEY_1 },           /* 1 */
@@ -147,8 +147,8 @@ static struct dvb_usb_device_properties a800_properties = {
	.identify_state   = a800_identify_state,

	.rc_interval      = DEFAULT_RC_INTERVAL,
	.rc_key_map       = a800_rc_keys,
	.rc_key_map_size  = ARRAY_SIZE(a800_rc_keys),
	.rc_key_map       = ir_codes_a800_table,
	.rc_key_map_size  = ARRAY_SIZE(ir_codes_a800_table),
	.rc_query         = a800_rc_query,

	.i2c_algo         = &dibusb_i2c_algo,
+8 −8
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ MODULE_PARM_DESC(debug,

#define deb_decode(args...)   dprintk(dvb_usb_af9005_remote_debug,0x01,args)

struct dvb_usb_rc_key af9005_rc_keys[] = {
struct dvb_usb_rc_key ir_codes_af9005_table[] = {

	{0x01b7, KEY_POWER},
	{0x01a7, KEY_VOLUMEUP},
@@ -74,7 +74,7 @@ struct dvb_usb_rc_key af9005_rc_keys[] = {
	{0x00d5, KEY_GOTO},	/* marked jump on the remote */
};

int af9005_rc_keys_size = ARRAY_SIZE(af9005_rc_keys);
int ir_codes_af9005_table_size = ARRAY_SIZE(ir_codes_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 < af9005_rc_keys_size; i++) {
				if (rc5_custom(&af9005_rc_keys[i]) == cust
				    && rc5_data(&af9005_rc_keys[i]) == dat) {
					*event = af9005_rc_keys[i].event;
			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].event;
					*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(af9005_rc_keys);
EXPORT_SYMBOL(af9005_rc_keys_size);
EXPORT_SYMBOL(ir_codes_af9005_table);
EXPORT_SYMBOL(ir_codes_af9005_table_size);
EXPORT_SYMBOL(af9005_rc_decode);

MODULE_AUTHOR("Luca Olivetti <luca@ventoso.org>");
+4 −4
Original line number Diff line number Diff line
@@ -1109,8 +1109,8 @@ static int __init af9005_usb_module_init(void)
		return result;
	}
	rc_decode = symbol_request(af9005_rc_decode);
	rc_keys = symbol_request(af9005_rc_keys);
	rc_keys_size = symbol_request(af9005_rc_keys_size);
	rc_keys = symbol_request(ir_codes_af9005_table);
	rc_keys_size = symbol_request(ir_codes_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_query = NULL;
@@ -1128,9 +1128,9 @@ static void __exit af9005_usb_module_exit(void)
	if (rc_decode != NULL)
		symbol_put(af9005_rc_decode);
	if (rc_keys != NULL)
		symbol_put(af9005_rc_keys);
		symbol_put(ir_codes_af9005_table);
	if (rc_keys_size != NULL)
		symbol_put(af9005_rc_keys_size);
		symbol_put(ir_codes_af9005_table_size);
	/* deregister this driver from the USB subsystem */
	usb_deregister(&af9005_usb_driver);
}
+2 −2
Original line number Diff line number Diff line
@@ -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 dvb_usb_rc_key af9005_rc_keys[];
extern int af9005_rc_keys_size;
extern struct dvb_usb_rc_key ir_codes_af9005_table[];
extern int ir_codes_af9005_table_size;

#endif
+15 −15
Original line number Diff line number Diff line
@@ -752,19 +752,19 @@ static const struct af9015_setup *af9015_setup_match(unsigned int id,

static const struct af9015_setup af9015_setup_modparam[] = {
	{ AF9015_REMOTE_A_LINK_DTU_M,
		af9015_rc_keys_a_link, ARRAY_SIZE(af9015_rc_keys_a_link),
		ir_codes_af9015_table_a_link, ARRAY_SIZE(ir_codes_af9015_table_a_link),
		af9015_ir_table_a_link, ARRAY_SIZE(af9015_ir_table_a_link) },
	{ AF9015_REMOTE_MSI_DIGIVOX_MINI_II_V3,
		af9015_rc_keys_msi, ARRAY_SIZE(af9015_rc_keys_msi),
		ir_codes_af9015_table_msi, ARRAY_SIZE(ir_codes_af9015_table_msi),
		af9015_ir_table_msi, ARRAY_SIZE(af9015_ir_table_msi) },
	{ AF9015_REMOTE_MYGICTV_U718,
		af9015_rc_keys_mygictv, ARRAY_SIZE(af9015_rc_keys_mygictv),
		ir_codes_af9015_table_mygictv, ARRAY_SIZE(ir_codes_af9015_table_mygictv),
		af9015_ir_table_mygictv, ARRAY_SIZE(af9015_ir_table_mygictv) },
	{ AF9015_REMOTE_DIGITTRADE_DVB_T,
		af9015_rc_keys_digittrade, ARRAY_SIZE(af9015_rc_keys_digittrade),
		ir_codes_af9015_table_digittrade, ARRAY_SIZE(ir_codes_af9015_table_digittrade),
		af9015_ir_table_digittrade, ARRAY_SIZE(af9015_ir_table_digittrade) },
	{ AF9015_REMOTE_AVERMEDIA_KS,
		af9015_rc_keys_avermedia, ARRAY_SIZE(af9015_rc_keys_avermedia),
		ir_codes_af9015_table_avermedia, ARRAY_SIZE(ir_codes_af9015_table_avermedia),
		af9015_ir_table_avermedia_ks, ARRAY_SIZE(af9015_ir_table_avermedia_ks) },
	{ }
};
@@ -772,32 +772,32 @@ static const struct af9015_setup af9015_setup_modparam[] = {
/* don't add new entries here anymore, use hashes instead */
static const struct af9015_setup af9015_setup_usbids[] = {
	{ USB_VID_LEADTEK,
		af9015_rc_keys_leadtek, ARRAY_SIZE(af9015_rc_keys_leadtek),
		ir_codes_af9015_table_leadtek, ARRAY_SIZE(ir_codes_af9015_table_leadtek),
		af9015_ir_table_leadtek, ARRAY_SIZE(af9015_ir_table_leadtek) },
	{ USB_VID_VISIONPLUS,
		af9015_rc_keys_twinhan, ARRAY_SIZE(af9015_rc_keys_twinhan),
		ir_codes_af9015_table_twinhan, ARRAY_SIZE(ir_codes_af9015_table_twinhan),
		af9015_ir_table_twinhan, ARRAY_SIZE(af9015_ir_table_twinhan) },
	{ USB_VID_KWORLD_2, /* TODO: use correct rc keys */
		af9015_rc_keys_twinhan, ARRAY_SIZE(af9015_rc_keys_twinhan),
		ir_codes_af9015_table_twinhan, ARRAY_SIZE(ir_codes_af9015_table_twinhan),
		af9015_ir_table_kworld, ARRAY_SIZE(af9015_ir_table_kworld) },
	{ USB_VID_AVERMEDIA,
		af9015_rc_keys_avermedia, ARRAY_SIZE(af9015_rc_keys_avermedia),
		ir_codes_af9015_table_avermedia, ARRAY_SIZE(ir_codes_af9015_table_avermedia),
		af9015_ir_table_avermedia, ARRAY_SIZE(af9015_ir_table_avermedia) },
	{ USB_VID_MSI_2,
		af9015_rc_keys_msi_digivox_iii, ARRAY_SIZE(af9015_rc_keys_msi_digivox_iii),
		ir_codes_af9015_table_msi_digivox_iii, ARRAY_SIZE(ir_codes_af9015_table_msi_digivox_iii),
		af9015_ir_table_msi_digivox_iii, ARRAY_SIZE(af9015_ir_table_msi_digivox_iii) },
	{ }
};

static const struct af9015_setup af9015_setup_hashes[] = {
	{ 0xb8feb708,
		af9015_rc_keys_msi, ARRAY_SIZE(af9015_rc_keys_msi),
		ir_codes_af9015_table_msi, ARRAY_SIZE(ir_codes_af9015_table_msi),
		af9015_ir_table_msi, ARRAY_SIZE(af9015_ir_table_msi) },
	{ 0xa3703d00,
		af9015_rc_keys_a_link, ARRAY_SIZE(af9015_rc_keys_a_link),
		ir_codes_af9015_table_a_link, ARRAY_SIZE(ir_codes_af9015_table_a_link),
		af9015_ir_table_a_link, ARRAY_SIZE(af9015_ir_table_a_link) },
	{ 0x9b7dc64e,
		af9015_rc_keys_mygictv, ARRAY_SIZE(af9015_rc_keys_mygictv),
		ir_codes_af9015_table_mygictv, ARRAY_SIZE(ir_codes_af9015_table_mygictv),
		af9015_ir_table_mygictv, ARRAY_SIZE(af9015_ir_table_mygictv) },
	{ }
};
@@ -836,8 +836,8 @@ static void af9015_set_remote_config(struct usb_device *udev,
			} else if (udev->descriptor.idProduct ==
				cpu_to_le16(USB_PID_TREKSTOR_DVBT)) {
				table = &(const struct af9015_setup){ 0,
					af9015_rc_keys_trekstor,
					ARRAY_SIZE(af9015_rc_keys_trekstor),
					ir_codes_af9015_table_trekstor,
					ARRAY_SIZE(ir_codes_af9015_table_trekstor),
					af9015_ir_table_trekstor,
					ARRAY_SIZE(af9015_ir_table_trekstor)
				};
Loading