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

V4L/DVB: ir: use IR_KEYTABLE where an IR table is needed



Replaces most of the occurences of IR keytables on V4L drivers by a macro
that evaluates to provide the name of the exported symbol.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 165344bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -596,7 +596,7 @@ static irqreturn_t dm1105_irq(int irq, void *dev_id)
int __devinit dm1105_ir_init(struct dm1105_dev *dm1105)
{
	struct input_dev *input_dev;
	struct ir_scancode_table *ir_codes = &ir_codes_dm1105_nec_table;
	struct ir_scancode_table *ir_codes = &IR_KEYTABLE(dm1105_nec);
	u64 ir_type = IR_TYPE_OTHER;
	int err = -ENOMEM;

+3 −3
Original line number Diff line number Diff line
@@ -232,7 +232,7 @@ static int msp430_ir_init(struct budget_ci *budget_ci)
	case 0x1011:
	case 0x1012:
		/* The hauppauge keymap is a superset of these remotes */
		ir_codes = &ir_codes_hauppauge_new_table;
		ir_codes = &IR_KEYTABLE(hauppauge_new);

		if (rc5_device < 0)
			budget_ci->ir.rc5_device = 0x1f;
@@ -241,11 +241,11 @@ static int msp430_ir_init(struct budget_ci *budget_ci)
	case 0x1017:
	case 0x101a:
		/* for the Technotrend 1500 bundled remote */
		ir_codes = &ir_codes_tt_1500_table;
		ir_codes = &IR_KEYTABLE(tt_1500);
		break;
	default:
		/* unknown remote */
		ir_codes = &ir_codes_budget_ci_old_table;
		ir_codes = &IR_KEYTABLE(budget_ci_old);
		break;
	}

+12 −12
Original line number Diff line number Diff line
@@ -266,7 +266,7 @@ int bttv_input_init(struct bttv *btv)
	case BTTV_BOARD_AVERMEDIA:
	case BTTV_BOARD_AVPHONE98:
	case BTTV_BOARD_AVERMEDIA98:
		ir_codes         = &ir_codes_avermedia_table;
		ir_codes         = &IR_KEYTABLE(avermedia);
		ir->mask_keycode = 0xf88000;
		ir->mask_keydown = 0x010000;
		ir->polling      = 50; // ms
@@ -274,14 +274,14 @@ int bttv_input_init(struct bttv *btv)

	case BTTV_BOARD_AVDVBT_761:
	case BTTV_BOARD_AVDVBT_771:
		ir_codes         = &ir_codes_avermedia_dvbt_table;
		ir_codes         = &IR_KEYTABLE(avermedia_dvbt);
		ir->mask_keycode = 0x0f00c0;
		ir->mask_keydown = 0x000020;
		ir->polling      = 50; // ms
		break;

	case BTTV_BOARD_PXELVWPLTVPAK:
		ir_codes         = &ir_codes_pixelview_table;
		ir_codes         = &IR_KEYTABLE(pixelview);
		ir->mask_keycode = 0x003e00;
		ir->mask_keyup   = 0x010000;
		ir->polling      = 50; // ms
@@ -289,24 +289,24 @@ int bttv_input_init(struct bttv *btv)
	case BTTV_BOARD_PV_M4900:
	case BTTV_BOARD_PV_BT878P_9B:
	case BTTV_BOARD_PV_BT878P_PLUS:
		ir_codes         = &ir_codes_pixelview_table;
		ir_codes         = &IR_KEYTABLE(pixelview);
		ir->mask_keycode = 0x001f00;
		ir->mask_keyup   = 0x008000;
		ir->polling      = 50; // ms
		break;

	case BTTV_BOARD_WINFAST2000:
		ir_codes         = &ir_codes_winfast_table;
		ir_codes         = &IR_KEYTABLE(winfast);
		ir->mask_keycode = 0x1f8;
		break;
	case BTTV_BOARD_MAGICTVIEW061:
	case BTTV_BOARD_MAGICTVIEW063:
		ir_codes         = &ir_codes_winfast_table;
		ir_codes         = &IR_KEYTABLE(winfast);
		ir->mask_keycode = 0x0008e000;
		ir->mask_keydown = 0x00200000;
		break;
	case BTTV_BOARD_APAC_VIEWCOMP:
		ir_codes         = &ir_codes_apac_viewcomp_table;
		ir_codes         = &IR_KEYTABLE(apac_viewcomp);
		ir->mask_keycode = 0x001f00;
		ir->mask_keyup   = 0x008000;
		ir->polling      = 50; // ms
@@ -314,30 +314,30 @@ int bttv_input_init(struct bttv *btv)
	case BTTV_BOARD_ASKEY_CPH03X:
	case BTTV_BOARD_CONCEPTRONIC_CTVFMI2:
	case BTTV_BOARD_CONTVFMI:
		ir_codes         = &ir_codes_pixelview_table;
		ir_codes         = &IR_KEYTABLE(pixelview);
		ir->mask_keycode = 0x001F00;
		ir->mask_keyup   = 0x006000;
		ir->polling      = 50; // ms
		break;
	case BTTV_BOARD_NEBULA_DIGITV:
		ir_codes = &ir_codes_nebula_table;
		ir_codes = &IR_KEYTABLE(nebula);
		btv->custom_irq = bttv_rc5_irq;
		ir->rc5_gpio = 1;
		break;
	case BTTV_BOARD_MACHTV_MAGICTV:
		ir_codes         = &ir_codes_apac_viewcomp_table;
		ir_codes         = &IR_KEYTABLE(apac_viewcomp);
		ir->mask_keycode = 0x001F00;
		ir->mask_keyup   = 0x004000;
		ir->polling      = 50; /* ms */
		break;
	case BTTV_BOARD_KOZUMI_KTV_01C:
		ir_codes         = &ir_codes_pctv_sedna_table;
		ir_codes         = &IR_KEYTABLE(pctv_sedna);
		ir->mask_keycode = 0x001f00;
		ir->mask_keyup   = 0x006000;
		ir->polling      = 50; /* ms */
		break;
	case BTTV_BOARD_ENLTV_FM_2:
		ir_codes         = &ir_codes_encore_enltv2_table;
		ir_codes         = &IR_KEYTABLE(encore_enltv2);
		ir->mask_keycode = 0x00fd00;
		ir->mask_keyup   = 0x000080;
		ir->polling      = 1; /* ms */
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ static int cx18_i2c_new_ir(struct cx18 *cx, struct i2c_adapter *adap, u32 hw,
	/* Our default information for ir-kbd-i2c.c to use */
	switch (hw) {
	case CX18_HW_Z8F0811_IR_RX_HAUP:
		init_data->ir_codes = &ir_codes_hauppauge_new_table;
		init_data->ir_codes = &IR_KEYTABLE(hauppauge_new);
		init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR;
		init_data->type = IR_TYPE_RC5;
		init_data->name = cx->card_name;
+1 −1
Original line number Diff line number Diff line
@@ -355,7 +355,7 @@ int cx23885_input_init(struct cx23885_dev *dev)
	case CX23885_BOARD_HAUPPAUGE_HVR1850:
	case CX23885_BOARD_HAUPPAUGE_HVR1290:
		/* Parameters for the grey Hauppauge remote for the HVR-1850 */
		ir_codes = &ir_codes_hauppauge_new_table;
		ir_codes = &IR_KEYTABLE(hauppauge_new);
		ir_type = IR_TYPE_RC5;
		ir_addr = 0x1e; /* RC-5 system bits emitted by the remote */
		ir_start = RC5_START_BITS_NORMAL; /* A basic RC-5 remote */
Loading