[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>
This commit is contained in:
Sean Young
2016-07-10 13:34:38 -03:00
committed by Mauro Carvalho Chehab
parent 25da661a14
commit 4f253cecf8
3 changed files with 41 additions and 1 deletions

View File

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