summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2019-08-09 19:31:08 -0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-08-14 05:06:04 -0300
commit494fce160f2dac6f78d4282b54942fe03de59641 (patch)
tree9be5aea11e6c8e737519172b158f0e177e4595a9 /drivers/media/rc
parente70d13f7ac061da3fcb982a049e98f63b7ded3d9 (diff)
downloadlinux-494fce160f2dac6f78d4282b54942fe03de59641.tar.bz2
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>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r--drivers/media/rc/imon_raw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/imon_raw.c b/drivers/media/rc/imon_raw.c
index e6723993b466..d4aedcf76418 100644
--- a/drivers/media/rc/imon_raw.c
+++ b/drivers/media/rc/imon_raw.c
@@ -85,7 +85,7 @@ static void imon_ir_data(struct imon *imon)
offset = bit;
} while (offset > 0);
- if (packet_no == 0x0a) {
+ if (packet_no == 0x0a && !imon->rcdev->idle) {
ir_raw_event_set_idle(imon->rcdev, true);
ir_raw_event_handle(imon->rcdev);
}