Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34abf219 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

V4L/DVB: dvb-usb: get rid of struct dvb_usb_rc_key



dvb-usb has its own IR handle code. Now that we have a Remote
Controller subsystem, we should start using it. So, remove this
struct, in favor of the similar struct defined at the RC subsystem.

This is a big, but trivial patch. It is a 3 line delect, plus
lots of rename on several dvb-usb files.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 0172fea3
Loading
Loading
Loading
Loading
+1 −1
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 ir_codes_a800_table[] = {
static struct ir_scancode ir_codes_a800_table[] = {
	{ 0x0201, KEY_PROG1 },       /* SOURCE */
	{ 0x0200, KEY_POWER },       /* POWER */
	{ 0x0205, KEY_1 },           /* 1 */
+2 −2
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 ir_codes_af9005_table[] = {
struct ir_scancode ir_codes_af9005_table[] = {

	{0x01b7, KEY_POWER},
	{0x01a7, KEY_VOLUMEUP},
@@ -133,7 +133,7 @@ int af9005_rc_decode(struct dvb_usb_device *d, u8 * data, int len, u32 * 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;
					*event = ir_codes_af9005_table[i].keycode;
					*state = REMOTE_KEY_PRESSED;
					deb_decode
					    ("key pressed, event %x\n", *event);
+1 −1
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 ir_codes_af9005_table[];
extern struct ir_scancode ir_codes_af9005_table[];
extern int ir_codes_af9005_table_size;

#endif
+3 −3
Original line number Diff line number Diff line
@@ -735,7 +735,7 @@ static int af9015_download_firmware(struct usb_device *udev,

struct af9015_setup {
	unsigned int id;
	struct dvb_usb_rc_key *rc_key_map;
	struct ir_scancode *rc_key_map;
	unsigned int rc_key_map_size;
	u8 *ir_table;
	unsigned int ir_table_size;
@@ -1063,7 +1063,7 @@ static int af9015_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
{
	u8 buf[8];
	struct req_t req = {GET_IR_CODE, 0, 0, 0, 0, sizeof(buf), buf};
	struct dvb_usb_rc_key *keymap = d->props.rc_key_map;
	struct ir_scancode *keymap = d->props.rc_key_map;
	int i, ret;

	memset(buf, 0, sizeof(buf));
@@ -1078,7 +1078,7 @@ static int af9015_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
	for (i = 0; i < d->props.rc_key_map_size; i++) {
		if (!buf[1] && rc5_custom(&keymap[i]) == buf[0] &&
		    rc5_data(&keymap[i]) == buf[2]) {
			*event = keymap[i].event;
			*event = keymap[i].keycode;
			*state = REMOTE_KEY_PRESSED;
			break;
		}
+9 −9
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ enum af9015_remote {

/* LeadTek - Y04G0051 */
/* Leadtek WinFast DTV Dongle Gold */
static struct dvb_usb_rc_key ir_codes_af9015_table_leadtek[] = {
static struct ir_scancode ir_codes_af9015_table_leadtek[] = {
	{ 0x001e, KEY_1 },
	{ 0x001f, KEY_2 },
	{ 0x0020, KEY_3 },
@@ -227,7 +227,7 @@ static u8 af9015_ir_table_leadtek[] = {
};

/* TwinHan AzureWave AD-TU700(704J) */
static struct dvb_usb_rc_key ir_codes_af9015_table_twinhan[] = {
static struct ir_scancode ir_codes_af9015_table_twinhan[] = {
	{ 0x053f, KEY_POWER },
	{ 0x0019, KEY_FAVORITES },    /* Favorite List */
	{ 0x0004, KEY_TEXT },         /* Teletext */
@@ -338,7 +338,7 @@ static u8 af9015_ir_table_twinhan[] = {
};

/* A-Link DTU(m) */
static struct dvb_usb_rc_key ir_codes_af9015_table_a_link[] = {
static struct ir_scancode ir_codes_af9015_table_a_link[] = {
	{ 0x001e, KEY_1 },
	{ 0x001f, KEY_2 },
	{ 0x0020, KEY_3 },
@@ -381,7 +381,7 @@ static u8 af9015_ir_table_a_link[] = {
};

/* MSI DIGIVOX mini II V3.0 */
static struct dvb_usb_rc_key ir_codes_af9015_table_msi[] = {
static struct ir_scancode ir_codes_af9015_table_msi[] = {
	{ 0x001e, KEY_1 },
	{ 0x001f, KEY_2 },
	{ 0x0020, KEY_3 },
@@ -424,7 +424,7 @@ static u8 af9015_ir_table_msi[] = {
};

/* MYGICTV U718 */
static struct dvb_usb_rc_key ir_codes_af9015_table_mygictv[] = {
static struct ir_scancode ir_codes_af9015_table_mygictv[] = {
	{ 0x003d, KEY_SWITCHVIDEOMODE },
					  /* TV / AV */
	{ 0x0545, KEY_POWER },
@@ -550,7 +550,7 @@ static u8 af9015_ir_table_kworld[] = {
};

/* AverMedia Volar X */
static struct dvb_usb_rc_key ir_codes_af9015_table_avermedia[] = {
static struct ir_scancode ir_codes_af9015_table_avermedia[] = {
	{ 0x053d, KEY_PROG1 },       /* SOURCE */
	{ 0x0512, KEY_POWER },       /* POWER */
	{ 0x051e, KEY_1 },           /* 1 */
@@ -656,7 +656,7 @@ static u8 af9015_ir_table_avermedia_ks[] = {
};

/* Digittrade DVB-T USB Stick */
static struct dvb_usb_rc_key ir_codes_af9015_table_digittrade[] = {
static struct ir_scancode ir_codes_af9015_table_digittrade[] = {
	{ 0x010f, KEY_LAST },	/* RETURN */
	{ 0x0517, KEY_TEXT },	/* TELETEXT */
	{ 0x0108, KEY_EPG },	/* EPG */
@@ -719,7 +719,7 @@ static u8 af9015_ir_table_digittrade[] = {
};

/* TREKSTOR DVB-T USB Stick */
static struct dvb_usb_rc_key ir_codes_af9015_table_trekstor[] = {
static struct ir_scancode ir_codes_af9015_table_trekstor[] = {
	{ 0x0704, KEY_AGAIN },		/* Home */
	{ 0x0705, KEY_MUTE },		/* Mute */
	{ 0x0706, KEY_UP },			/* Up */
@@ -782,7 +782,7 @@ static u8 af9015_ir_table_trekstor[] = {
};

/* MSI DIGIVOX mini III */
static struct dvb_usb_rc_key ir_codes_af9015_table_msi_digivox_iii[] = {
static struct ir_scancode ir_codes_af9015_table_msi_digivox_iii[] = {
	{ 0x0713, KEY_POWER },       /* [red power button] */
	{ 0x073b, KEY_VIDEO },       /* Source */
	{ 0x073e, KEY_ZOOM },        /* Zoom */
Loading