aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2018-05-10 16:41:15 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-05-14 07:14:51 -0400
commite0d51e6ceff818c5d7a812c26bbd1bb84348a71a (patch)
tree906bb6cadef250039a6d514173889ee59a80b18d /drivers/media/rc
parentmedia: lirc-func.rst: new ioctl LIRC_GET_REC_TIMEOUT is not in a separate file (diff)
downloadlinux-dev-e0d51e6ceff818c5d7a812c26bbd1bb84348a71a.tar.xz
linux-dev-e0d51e6ceff818c5d7a812c26bbd1bb84348a71a.zip
media: rc: default to idle on at startup or after reset
Any spaces events received after a reset or startup should be discarded, so ensure the rc device is in idle mode. This also makes it much easier to detect incorrect raw events, as we will do in a following commit. 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/rc-ir-raw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c
index 2ab8a2b7092a..2e50104ae138 100644
--- a/drivers/media/rc/rc-ir-raw.c
+++ b/drivers/media/rc/rc-ir-raw.c
@@ -611,6 +611,7 @@ int ir_raw_event_prepare(struct rc_dev *dev)
dev->raw->dev = dev;
dev->change_protocol = change_protocol;
+ dev->idle = true;
spin_lock_init(&dev->raw->edge_spinlock);
timer_setup(&dev->raw->edge_handle, ir_raw_edge_handle, 0);
INIT_KFIFO(dev->raw->kfifo);