提交 29422737 编写于 作者: S Sean Young 提交者: Mauro Carvalho Chehab

media: rc: get start time just before calling driver tx

The current code gets the start time before copying the IR from
userspace (could cause page faults) and encoding IR. This means
that the gap calculation could be off.
Signed-off-by: NSean Young <sean@mess.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 c2837ad0
......@@ -249,8 +249,6 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, const char __user *buf,
goto out_unlock;
}
start = ktime_get();
if (!dev->tx_ir) {
ret = -EINVAL;
goto out_unlock;
......@@ -343,6 +341,8 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, const char __user *buf,
duration += txbuf[i];
}
start = ktime_get();
ret = dev->tx_ir(dev, txbuf, count);
if (ret < 0)
goto out_kfree;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册