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

Commit dc697984 authored by Maxim Levitsky's avatar Maxim Levitsky Committed by Mauro Carvalho Chehab
Browse files

[media] IR: initialize ir_raw_event in few more drivers



Few drivers still have assumption that ir_raw_event
consists of duration and pulse flag.
Fix that.

Signed-off-by: default avatarMaxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 910f5f05
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ void sms_ir_event(struct smscore_device_t *coredev, const char *buf, int len)
	const s32 *samples = (const void *)buf;

	for (i = 0; i < len >> 2; i++) {
		struct ir_raw_event ev;
		DEFINE_IR_RAW_EVENT(ev);

		ev.duration = abs(samples[i]) * 1000; /* Convert to ns */
		ev.pulse = (samples[i] > 0) ? false : true;
+1 −0
Original line number Diff line number Diff line
@@ -704,6 +704,7 @@ static int cx23888_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count,
		if (v > IR_MAX_DURATION)
			v = IR_MAX_DURATION;

		init_ir_raw_event(&p->ir_core_data);
		p->ir_core_data.pulse = u;
		p->ir_core_data.duration = v;

+1 −0
Original line number Diff line number Diff line
@@ -706,6 +706,7 @@ static int cx25840_ir_rx_read(struct v4l2_subdev *sd, u8 *buf, size_t count,
		if (v > IR_MAX_DURATION)
			v = IR_MAX_DURATION;

		init_ir_raw_event(&p->ir_core_data);
		p->ir_core_data.pulse = u;
		p->ir_core_data.duration = v;