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

Commit 52b66144 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[media] rc: Rename remote controller type to rc_type instead of ir_type



for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,IR_TYPE,RC_TYPE,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_type,rc_type,g <$i >a && mv a $i; done

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 29e3ec19
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -1344,11 +1344,11 @@ static struct dvb_usb_device_properties af9015_properties[] = {
		.identify_state = af9015_identify_state,
		.identify_state = af9015_identify_state,


		.rc.core = {
		.rc.core = {
			.protocol         = IR_TYPE_NEC,
			.protocol         = RC_TYPE_NEC,
			.module_name      = "af9015",
			.module_name      = "af9015",
			.rc_query         = af9015_rc_query,
			.rc_query         = af9015_rc_query,
			.rc_interval      = AF9015_RC_INTERVAL,
			.rc_interval      = AF9015_RC_INTERVAL,
			.allowed_protos   = IR_TYPE_NEC,
			.allowed_protos   = RC_TYPE_NEC,
		},
		},


		.i2c_algo = &af9015_i2c_algo,
		.i2c_algo = &af9015_i2c_algo,
@@ -1472,11 +1472,11 @@ static struct dvb_usb_device_properties af9015_properties[] = {
		.identify_state = af9015_identify_state,
		.identify_state = af9015_identify_state,


		.rc.core = {
		.rc.core = {
			.protocol         = IR_TYPE_NEC,
			.protocol         = RC_TYPE_NEC,
			.module_name      = "af9015",
			.module_name      = "af9015",
			.rc_query         = af9015_rc_query,
			.rc_query         = af9015_rc_query,
			.rc_interval      = AF9015_RC_INTERVAL,
			.rc_interval      = AF9015_RC_INTERVAL,
			.allowed_protos   = IR_TYPE_NEC,
			.allowed_protos   = RC_TYPE_NEC,
		},
		},


		.i2c_algo = &af9015_i2c_algo,
		.i2c_algo = &af9015_i2c_algo,
@@ -1584,11 +1584,11 @@ static struct dvb_usb_device_properties af9015_properties[] = {
		.identify_state = af9015_identify_state,
		.identify_state = af9015_identify_state,


		.rc.core = {
		.rc.core = {
			.protocol         = IR_TYPE_NEC,
			.protocol         = RC_TYPE_NEC,
			.module_name      = "af9015",
			.module_name      = "af9015",
			.rc_query         = af9015_rc_query,
			.rc_query         = af9015_rc_query,
			.rc_interval      = AF9015_RC_INTERVAL,
			.rc_interval      = AF9015_RC_INTERVAL,
			.allowed_protos   = IR_TYPE_NEC,
			.allowed_protos   = RC_TYPE_NEC,
		},
		},


		.i2c_algo = &af9015_i2c_algo,
		.i2c_algo = &af9015_i2c_algo,
+1 −1
Original line number Original line Diff line number Diff line
@@ -476,7 +476,7 @@ static struct dvb_usb_device_properties anysee_properties = {


	.rc.core = {
	.rc.core = {
		.rc_codes         = RC_MAP_ANYSEE,
		.rc_codes         = RC_MAP_ANYSEE,
		.protocol         = IR_TYPE_OTHER,
		.protocol         = RC_TYPE_OTHER,
		.module_name      = "anysee",
		.module_name      = "anysee",
		.rc_query         = anysee_rc_query,
		.rc_query         = anysee_rc_query,
		.rc_interval      = 250,  /* windows driver uses 500ms */
		.rc_interval      = 250,  /* windows driver uses 500ms */
+1 −1
Original line number Original line Diff line number Diff line
@@ -60,7 +60,7 @@ extern int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff);
extern struct i2c_algorithm dib0700_i2c_algo;
extern struct i2c_algorithm dib0700_i2c_algo;
extern int dib0700_identify_state(struct usb_device *udev, struct dvb_usb_device_properties *props,
extern int dib0700_identify_state(struct usb_device *udev, struct dvb_usb_device_properties *props,
			struct dvb_usb_device_description **desc, int *cold);
			struct dvb_usb_device_description **desc, int *cold);
extern int dib0700_change_protocol(struct rc_dev *dev, u64 ir_type);
extern int dib0700_change_protocol(struct rc_dev *dev, u64 rc_type);


extern int dib0700_device_count;
extern int dib0700_device_count;
extern int dvb_usb_dib0700_ir_proto;
extern int dvb_usb_dib0700_ir_proto;
+6 −6
Original line number Original line Diff line number Diff line
@@ -471,7 +471,7 @@ int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
	return dib0700_ctrl_wr(adap->dev, b, 4);
	return dib0700_ctrl_wr(adap->dev, b, 4);
}
}


int dib0700_change_protocol(struct rc_dev *rc, u64 ir_type)
int dib0700_change_protocol(struct rc_dev *rc, u64 rc_type)
{
{
	struct dvb_usb_device *d = rc->priv;
	struct dvb_usb_device *d = rc->priv;
	struct dib0700_state *st = d->priv;
	struct dib0700_state *st = d->priv;
@@ -479,11 +479,11 @@ int dib0700_change_protocol(struct rc_dev *rc, u64 ir_type)
	int new_proto, ret;
	int new_proto, ret;


	/* Set the IR mode */
	/* Set the IR mode */
	if (ir_type == IR_TYPE_RC5)
	if (rc_type == RC_TYPE_RC5)
		new_proto = 1;
		new_proto = 1;
	else if (ir_type == IR_TYPE_NEC)
	else if (rc_type == RC_TYPE_NEC)
		new_proto = 0;
		new_proto = 0;
	else if (ir_type == IR_TYPE_RC6) {
	else if (rc_type == RC_TYPE_RC6) {
		if (st->fw_version < 0x10200)
		if (st->fw_version < 0x10200)
			return -EINVAL;
			return -EINVAL;


@@ -499,7 +499,7 @@ int dib0700_change_protocol(struct rc_dev *rc, u64 ir_type)
		return ret;
		return ret;
	}
	}


	d->props.rc.core.protocol = ir_type;
	d->props.rc.core.protocol = rc_type;


	return ret;
	return ret;
}
}
@@ -562,7 +562,7 @@ static void dib0700_rc_urb_completion(struct urb *purb)
		 purb->actual_length);
		 purb->actual_length);


	switch (d->props.rc.core.protocol) {
	switch (d->props.rc.core.protocol) {
	case IR_TYPE_NEC:
	case RC_TYPE_NEC:
		toggle = 0;
		toggle = 0;


		/* NEC protocol sends repeat code as 0 0 0 FF */
		/* NEC protocol sends repeat code as 0 0 0 FF */
+43 −43
Original line number Original line Diff line number Diff line
@@ -510,7 +510,7 @@ static int dib0700_rc_query_old_firmware(struct dvb_usb_device *d)


	d->last_event = 0;
	d->last_event = 0;
	switch (d->props.rc.core.protocol) {
	switch (d->props.rc.core.protocol) {
	case IR_TYPE_NEC:
	case RC_TYPE_NEC:
		/* NEC protocol sends repeat code as 0 0 0 FF */
		/* NEC protocol sends repeat code as 0 0 0 FF */
		if ((key[3-2] == 0x00) && (key[3-3] == 0x00) &&
		if ((key[3-2] == 0x00) && (key[3-3] == 0x00) &&
		    (key[3] == 0xff))
		    (key[3] == 0xff))
@@ -1924,9 +1924,9 @@ struct dvb_usb_device_properties dib0700_devices[] = {
			.rc_interval      = DEFAULT_RC_INTERVAL,
			.rc_interval      = DEFAULT_RC_INTERVAL,
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.rc_query         = dib0700_rc_query_old_firmware,
			.rc_query         = dib0700_rc_query_old_firmware,
			.allowed_protos   = IR_TYPE_RC5 |
			.allowed_protos   = RC_TYPE_RC5 |
					    IR_TYPE_RC6 |
					    RC_TYPE_RC6 |
					    IR_TYPE_NEC,
					    RC_TYPE_NEC,
			.change_protocol  = dib0700_change_protocol,
			.change_protocol  = dib0700_change_protocol,
		},
		},
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -1958,9 +1958,9 @@ struct dvb_usb_device_properties dib0700_devices[] = {
			.rc_interval      = DEFAULT_RC_INTERVAL,
			.rc_interval      = DEFAULT_RC_INTERVAL,
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.rc_query         = dib0700_rc_query_old_firmware,
			.rc_query         = dib0700_rc_query_old_firmware,
			.allowed_protos   = IR_TYPE_RC5 |
			.allowed_protos   = RC_TYPE_RC5 |
					    IR_TYPE_RC6 |
					    RC_TYPE_RC6 |
					    IR_TYPE_NEC,
					    RC_TYPE_NEC,
			.change_protocol = dib0700_change_protocol,
			.change_protocol = dib0700_change_protocol,
		},
		},
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2017,9 +2017,9 @@ struct dvb_usb_device_properties dib0700_devices[] = {
			.rc_interval      = DEFAULT_RC_INTERVAL,
			.rc_interval      = DEFAULT_RC_INTERVAL,
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.rc_query         = dib0700_rc_query_old_firmware,
			.rc_query         = dib0700_rc_query_old_firmware,
			.allowed_protos   = IR_TYPE_RC5 |
			.allowed_protos   = RC_TYPE_RC5 |
					    IR_TYPE_RC6 |
					    RC_TYPE_RC6 |
					    IR_TYPE_NEC,
					    RC_TYPE_NEC,
			.change_protocol = dib0700_change_protocol,
			.change_protocol = dib0700_change_protocol,
		},
		},
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2059,9 +2059,9 @@ struct dvb_usb_device_properties dib0700_devices[] = {
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.module_name	  = "dib0700",
			.module_name	  = "dib0700",
			.rc_query         = dib0700_rc_query_old_firmware,
			.rc_query         = dib0700_rc_query_old_firmware,
			.allowed_protos   = IR_TYPE_RC5 |
			.allowed_protos   = RC_TYPE_RC5 |
					    IR_TYPE_RC6 |
					    RC_TYPE_RC6 |
					    IR_TYPE_NEC,
					    RC_TYPE_NEC,
			.change_protocol = dib0700_change_protocol,
			.change_protocol = dib0700_change_protocol,
		},
		},
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2135,9 +2135,9 @@ struct dvb_usb_device_properties dib0700_devices[] = {
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.module_name	  = "dib0700",
			.module_name	  = "dib0700",
			.rc_query         = dib0700_rc_query_old_firmware,
			.rc_query         = dib0700_rc_query_old_firmware,
			.allowed_protos   = IR_TYPE_RC5 |
			.allowed_protos   = RC_TYPE_RC5 |
					    IR_TYPE_RC6 |
					    RC_TYPE_RC6 |
					    IR_TYPE_NEC,
					    RC_TYPE_NEC,
			.change_protocol  = dib0700_change_protocol,
			.change_protocol  = dib0700_change_protocol,
		},
		},
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2179,9 +2179,9 @@ struct dvb_usb_device_properties dib0700_devices[] = {
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.module_name	  = "dib0700",
			.module_name	  = "dib0700",
			.rc_query         = dib0700_rc_query_old_firmware,
			.rc_query         = dib0700_rc_query_old_firmware,
			.allowed_protos   = IR_TYPE_RC5 |
			.allowed_protos   = RC_TYPE_RC5 |
					    IR_TYPE_RC6 |
					    RC_TYPE_RC6 |
					    IR_TYPE_NEC,
					    RC_TYPE_NEC,
			.change_protocol  = dib0700_change_protocol,
			.change_protocol  = dib0700_change_protocol,
		},
		},
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2247,9 +2247,9 @@ struct dvb_usb_device_properties dib0700_devices[] = {
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.module_name	  = "dib0700",
			.module_name	  = "dib0700",
			.rc_query         = dib0700_rc_query_old_firmware,
			.rc_query         = dib0700_rc_query_old_firmware,
			.allowed_protos   = IR_TYPE_RC5 |
			.allowed_protos   = RC_TYPE_RC5 |
					    IR_TYPE_RC6 |
					    RC_TYPE_RC6 |
					    IR_TYPE_NEC,
					    RC_TYPE_NEC,
			.change_protocol = dib0700_change_protocol,
			.change_protocol = dib0700_change_protocol,
		},
		},
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2294,9 +2294,9 @@ struct dvb_usb_device_properties dib0700_devices[] = {
			.rc_codes         = RC_MAP_DIB0700_NEC_TABLE,
			.rc_codes         = RC_MAP_DIB0700_NEC_TABLE,
			.module_name	  = "dib0700",
			.module_name	  = "dib0700",
			.rc_query         = dib0700_rc_query_old_firmware,
			.rc_query         = dib0700_rc_query_old_firmware,
			.allowed_protos   = IR_TYPE_RC5 |
			.allowed_protos   = RC_TYPE_RC5 |
					    IR_TYPE_RC6 |
					    RC_TYPE_RC6 |
					    IR_TYPE_NEC,
					    RC_TYPE_NEC,
			.change_protocol  = dib0700_change_protocol,
			.change_protocol  = dib0700_change_protocol,
		},
		},
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2363,9 +2363,9 @@ struct dvb_usb_device_properties dib0700_devices[] = {
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.module_name	  = "dib0700",
			.module_name	  = "dib0700",
			.rc_query         = dib0700_rc_query_old_firmware,
			.rc_query         = dib0700_rc_query_old_firmware,
			.allowed_protos   = IR_TYPE_RC5 |
			.allowed_protos   = RC_TYPE_RC5 |
					    IR_TYPE_RC6 |
					    RC_TYPE_RC6 |
					    IR_TYPE_NEC,
					    RC_TYPE_NEC,
			.change_protocol  = dib0700_change_protocol,
			.change_protocol  = dib0700_change_protocol,
		},
		},
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2399,9 +2399,9 @@ struct dvb_usb_device_properties dib0700_devices[] = {
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.module_name	  = "dib0700",
			.module_name	  = "dib0700",
			.rc_query         = dib0700_rc_query_old_firmware,
			.rc_query         = dib0700_rc_query_old_firmware,
			.allowed_protos   = IR_TYPE_RC5 |
			.allowed_protos   = RC_TYPE_RC5 |
					    IR_TYPE_RC6 |
					    RC_TYPE_RC6 |
					    IR_TYPE_NEC,
					    RC_TYPE_NEC,
			.change_protocol  = dib0700_change_protocol,
			.change_protocol  = dib0700_change_protocol,
		},
		},
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2467,9 +2467,9 @@ struct dvb_usb_device_properties dib0700_devices[] = {
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.module_name	  = "dib0700",
			.module_name	  = "dib0700",
			.rc_query         = dib0700_rc_query_old_firmware,
			.rc_query         = dib0700_rc_query_old_firmware,
			.allowed_protos   = IR_TYPE_RC5 |
			.allowed_protos   = RC_TYPE_RC5 |
					    IR_TYPE_RC6 |
					    RC_TYPE_RC6 |
					    IR_TYPE_NEC,
					    RC_TYPE_NEC,
			.change_protocol  = dib0700_change_protocol,
			.change_protocol  = dib0700_change_protocol,
		},
		},
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2511,9 +2511,9 @@ struct dvb_usb_device_properties dib0700_devices[] = {
			.rc_codes         = RC_MAP_DIB0700_NEC_TABLE,
			.rc_codes         = RC_MAP_DIB0700_NEC_TABLE,
			.module_name	  = "dib0700",
			.module_name	  = "dib0700",
			.rc_query         = dib0700_rc_query_old_firmware,
			.rc_query         = dib0700_rc_query_old_firmware,
			.allowed_protos   = IR_TYPE_RC5 |
			.allowed_protos   = RC_TYPE_RC5 |
					    IR_TYPE_RC6 |
					    RC_TYPE_RC6 |
					    IR_TYPE_NEC,
					    RC_TYPE_NEC,
			.change_protocol  = dib0700_change_protocol,
			.change_protocol  = dib0700_change_protocol,
		},
		},
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2560,9 +2560,9 @@ struct dvb_usb_device_properties dib0700_devices[] = {
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.module_name	  = "dib0700",
			.module_name	  = "dib0700",
			.rc_query         = dib0700_rc_query_old_firmware,
			.rc_query         = dib0700_rc_query_old_firmware,
			.allowed_protos   = IR_TYPE_RC5 |
			.allowed_protos   = RC_TYPE_RC5 |
					    IR_TYPE_RC6 |
					    RC_TYPE_RC6 |
					    IR_TYPE_NEC,
					    RC_TYPE_NEC,
			.change_protocol  = dib0700_change_protocol,
			.change_protocol  = dib0700_change_protocol,
		},
		},
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
	}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2597,9 +2597,9 @@ struct dvb_usb_device_properties dib0700_devices[] = {
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.rc_codes         = RC_MAP_DIB0700_RC5_TABLE,
			.module_name	  = "dib0700",
			.module_name	  = "dib0700",
			.rc_query         = dib0700_rc_query_old_firmware,
			.rc_query         = dib0700_rc_query_old_firmware,
			.allowed_protos   = IR_TYPE_RC5 |
			.allowed_protos   = RC_TYPE_RC5 |
					    IR_TYPE_RC6 |
					    RC_TYPE_RC6 |
					    IR_TYPE_NEC,
					    RC_TYPE_NEC,
			.change_protocol  = dib0700_change_protocol,
			.change_protocol  = dib0700_change_protocol,
		},
		},
	},
	},
Loading