summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2016-07-11 05:48:10 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-12 13:40:06 -0300
commitca00033c9fc8b5f178573a76887c89296ed5b398 (patch)
tree8eed009db78d08feb0700b83366cbf949b430e26 /drivers/staging
parent10a5210ed40cb13c1645969ac4307dfa3f3d5a00 (diff)
downloadop-kernel-dev-ca00033c9fc8b5f178573a76887c89296ed5b398.zip
op-kernel-dev-ca00033c9fc8b5f178573a76887c89296ed5b398.tar.gz
[media] cec: CEC_RECEIVE is allowed in monitor mode
When the device is in monitor mode, then you should always be able to call CEC_RECEIVE, even it the device is unconfigured. 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/cec/cec-api.c b/drivers/staging/media/cec/cec-api.c
index d7cba7a..9151b1f 100644
--- a/drivers/staging/media/cec/cec-api.c
+++ b/drivers/staging/media/cec/cec-api.c
@@ -263,7 +263,7 @@ static long cec_receive(struct cec_adapter *adap, struct cec_fh *fh,
if (copy_from_user(&msg, parg, sizeof(msg)))
return -EFAULT;
mutex_lock(&adap->lock);
- if (!adap->is_configured)
+ if (!adap->is_configured && fh->mode_follower < CEC_MODE_MONITOR)
err = -ENONET;
mutex_unlock(&adap->lock);
if (err)
OpenPOWER on IntegriCloud