aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/lirc_dev.c
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2018-03-23 16:59:52 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-04-20 09:15:18 -0400
commit95d1544eb643847e05df06c3de252609593c9073 (patch)
treee9e4375d60c6644996d1bef7a3175de7ab66a7ed /drivers/media/rc/lirc_dev.c
parentmedia: rc: set timeout to smallest value required by enabled protocols (diff)
downloadlinux-dev-95d1544eb643847e05df06c3de252609593c9073.tar.xz
linux-dev-95d1544eb643847e05df06c3de252609593c9073.zip
media: rc: add ioctl to get the current timeout
Since the kernel now modifies the timeout, make it possible to retrieve the current value. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/lirc_dev.c')
-rw-r--r--drivers/media/rc/lirc_dev.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index 247e6fc3dc0c..6b4755e9fa25 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -575,6 +575,13 @@ static long ir_lirc_ioctl(struct file *file, unsigned int cmd,
}
break;
+ case LIRC_GET_REC_TIMEOUT:
+ if (!dev->timeout)
+ ret = -ENOTTY;
+ else
+ val = DIV_ROUND_UP(dev->timeout, 1000);
+ break;
+
case LIRC_SET_REC_TIMEOUT_REPORTS:
if (!dev->timeout)
ret = -ENOTTY;