summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorHans Verkuil2016-07-17 16:42:06 +0200
committerMauro Carvalho Chehab2016-07-19 18:26:06 +0200
commit58ecc29b5e829c2072fe3a98a93ef163bdb36dd9 (patch)
tree4b1ec5000900b5031594a8ee82f528220a7414ab /drivers/staging
parent[media] cec: limit the size of the transmit queue (diff)
downloadkernel-qcow2-linux-58ecc29b5e829c2072fe3a98a93ef163bdb36dd9.tar.gz
kernel-qcow2-linux-58ecc29b5e829c2072fe3a98a93ef163bdb36dd9.tar.xz
kernel-qcow2-linux-58ecc29b5e829c2072fe3a98a93ef163bdb36dd9.zip
[media] cec: fix test for unconfigured adapter in main message loop
The main message loop checks if the physical address was valid, and if not it is assumed that the adapter had been unconfigured. However, this check is no longer correct, instead it should check that both adap->is_configured and adap->is_configuring are false. 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-adap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/media/cec/cec-adap.c b/drivers/staging/media/cec/cec-adap.c
index 159a89379959..6fa3db512138 100644
--- a/drivers/staging/media/cec/cec-adap.c
+++ b/drivers/staging/media/cec/cec-adap.c
@@ -332,7 +332,7 @@ int cec_thread_func(void *_adap)
*/
err = wait_event_interruptible_timeout(adap->kthread_waitq,
kthread_should_stop() ||
- adap->phys_addr == CEC_PHYS_ADDR_INVALID ||
+ (!adap->is_configured && !adap->is_configuring) ||
(!adap->transmitting &&
!list_empty(&adap->transmit_queue)),
msecs_to_jiffies(CEC_XFER_TIMEOUT_MS));
@@ -347,7 +347,7 @@ int cec_thread_func(void *_adap)
mutex_lock(&adap->lock);
- if (adap->phys_addr == CEC_PHYS_ADDR_INVALID ||
+ if ((!adap->is_configured && !adap->is_configuring) ||
kthread_should_stop()) {
/*
* If the adapter is disabled, or we're asked to stop,