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>
Esse commit está contido em:
Sean Young
2018-03-23 16:59:52 -04:00
commit de Mauro Carvalho Chehab
commit 95d1544eb6
4 arquivos alterados com 23 adições e 5 exclusões

Ver arquivo

@@ -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;