diff options
author | Sean Young <sean@mess.org> | 2018-03-23 16:59:52 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-04-20 09:15:18 -0400 |
commit | 95d1544eb643847e05df06c3de252609593c9073 (patch) | |
tree | e9e4375d60c6644996d1bef7a3175de7ab66a7ed /drivers/media/rc | |
parent | a86d6df84ae6eb1fd1ca6cbd03f16637674a6af8 (diff) | |
download | linux-95d1544eb643847e05df06c3de252609593c9073.tar.bz2 |
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')
-rw-r--r-- | drivers/media/rc/lirc_dev.c | 7 |
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; |