summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorHans Verkuil2016-07-17 18:02:44 +0200
committerMauro Carvalho Chehab2016-07-19 18:27:10 +0200
commitb7cbc892532316f2abd880186301e57239a17f28 (patch)
treefa7ae7b586601f8779620bfb0c3ee932d447a4a4 /drivers/staging
parent[media] vivid: support monitor all mode (diff)
downloadkernel-qcow2-linux-b7cbc892532316f2abd880186301e57239a17f28.tar.gz
kernel-qcow2-linux-b7cbc892532316f2abd880186301e57239a17f28.tar.xz
kernel-qcow2-linux-b7cbc892532316f2abd880186301e57239a17f28.zip
[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: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/cec/cec-api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/media/cec/cec-api.c b/drivers/staging/media/cec/cec-api.c
index 559f6500d114..7be7615a0fdf 100644
--- a/drivers/staging/media/cec/cec-api.c
+++ b/drivers/staging/media/cec/cec-api.c
@@ -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;