提交 b7cbc892 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

[media] cec: poll should check if there is room in the tx queue

For POLLOUT poll only checked if the adapter was configured, not
if there was room in the transmit queue. Add that check.
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 83505028
......@@ -52,7 +52,8 @@ static unsigned int cec_poll(struct file *filp,
if (!devnode->registered)
return POLLERR | POLLHUP;
mutex_lock(&adap->lock);
if (adap->is_configured)
if (adap->is_configured &&
adap->transmit_queue_sz < CEC_MAX_MSG_TX_QUEUE_SZ)
res |= POLLOUT | POLLWRNORM;
if (fh->queued_msgs)
res |= POLLIN | POLLRDNORM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册