[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>
This commit is contained in:
Hans Verkuil 2016-07-11 05:48:10 -03:00 committed by Mauro Carvalho Chehab
parent 10a5210ed4
commit ca00033c9f

View File

@ -263,7 +263,7 @@ static long cec_receive(struct cec_adapter *adap, struct cec_fh *fh,
if (copy_from_user(&msg, parg, sizeof(msg))) if (copy_from_user(&msg, parg, sizeof(msg)))
return -EFAULT; return -EFAULT;
mutex_lock(&adap->lock); mutex_lock(&adap->lock);
if (!adap->is_configured) if (!adap->is_configured && fh->mode_follower < CEC_MODE_MONITOR)
err = -ENONET; err = -ENONET;
mutex_unlock(&adap->lock); mutex_unlock(&adap->lock);
if (err) if (err)