Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: imon_raw: prevent "nonsensical timing event of duration 0"

Sometimes the device sends IR data which is all space, no pulses
whatsoever. Add the end of this the driver will put the rc device into
idle mode when it already is in idle mode. The following will be logged:

rc rc0: nonsensical timing event of duration 0
rc rc0: two consecutive events of type space

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

authored by

Sean Young and committed by
Mauro Carvalho Chehab
494fce16 e70d13f7

+1 -1
+1 -1
drivers/media/rc/imon_raw.c
··· 85 85 offset = bit; 86 86 } while (offset > 0); 87 87 88 - if (packet_no == 0x0a) { 88 + if (packet_no == 0x0a && !imon->rcdev->idle) { 89 89 ir_raw_event_set_idle(imon->rcdev, true); 90 90 ir_raw_event_handle(imon->rcdev); 91 91 }