summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/ir-lirc-codec.c
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2016-07-10 13:34:38 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-15 12:01:46 -0300
commit4f253cecf8cb59816d53267170440efa3e1df018 (patch)
tree1e80321ddebea529875d348659b4b9027655ba11 /drivers/media/rc/ir-lirc-codec.c
parent25da661a14f38f34f01e0ddd6247614a295d29e3 (diff)
downloadtalos-obmc-linux-4f253cecf8cb59816d53267170440efa3e1df018.tar.gz
talos-obmc-linux-4f253cecf8cb59816d53267170440efa3e1df018.zip
[media] redrat3: make hardware timeout configurable
Instead of hardcoding a timeout, let userspace change it dynamically by adding a s_timeout ops. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/ir-lirc-codec.c')
-rw-r--r--drivers/media/rc/ir-lirc-codec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c
index 5effc65d2947..c3277308a70b 100644
--- a/drivers/media/rc/ir-lirc-codec.c
+++ b/drivers/media/rc/ir-lirc-codec.c
@@ -292,7 +292,10 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
tmp > dev->max_timeout)
return -EINVAL;
- dev->timeout = tmp;
+ if (dev->s_timeout)
+ ret = dev->s_timeout(dev, tmp);
+ if (!ret)
+ dev->timeout = tmp;
break;
case LIRC_SET_REC_TIMEOUT_REPORTS:
OpenPOWER on IntegriCloud