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

Commit 726cf56f authored by Vincent Penne's avatar Vincent Penne Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (5332): Ir_rc5_timer_end decoder lockup fix



ir_rc5_timer_end decoder lockup fix

Signed-off-by: default avatarVincent Penne <ziggy@sashipa.com>
Signed-off-by: default avatarHermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: default avatarHartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 703071b5
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -310,13 +310,15 @@ void ir_rc5_timer_end(unsigned long data)
		    tv.tv_usec - ir->base_time.tv_usec;
	}

	/* Allow some timmer jitter (RC5 is ~24ms anyway so this is ok) */
	/* signal we're ready to start a new code */
	ir->active = 0;

	/* Allow some timer jitter (RC5 is ~24ms anyway so this is ok) */
	if (gap < 28000) {
		dprintk(1, "ir-common: spurious timer_end\n");
		return;
	}

	ir->active = 0;
	if (ir->last_bit < 20) {
		/* ignore spurious codes (caused by light/other remotes) */
		dprintk(1, "ir-common: short code: %x\n", ir->code);