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>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
a86d6df84a
commit
95d1544eb6
@@ -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;
|
||||
|
Reference in New Issue
Block a user