[media] cec: allow configuration both from within driver and from user space
authorJohan Fjeldtvedt <jaffe1@gmail.com>
Mon, 22 Aug 2016 09:04:51 +0000 (06:04 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 6 Sep 2016 19:24:04 +0000 (16:24 -0300)
It makes sense for adapters such as the Pulse-Eight to be configurable
both from within the driver and from user space, so remove the
requirement that drivers only can call cec_s_log_addrs or
cec_s_phys_addr if they don't expose those capabilities to user space.

Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/cec/cec-adap.c

index b2393bbacb261551f16ecd2efd44cbfe18220fdd..608e3e7915e00572b983a815ebbfb065e30dee0a 100644 (file)
@@ -1153,8 +1153,6 @@ void cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block)
        if (IS_ERR_OR_NULL(adap))
                return;
 
-       if (WARN_ON(adap->capabilities & CEC_CAP_PHYS_ADDR))
-               return;
        mutex_lock(&adap->lock);
        __cec_s_phys_addr(adap, phys_addr, block);
        mutex_unlock(&adap->lock);
@@ -1295,8 +1293,6 @@ int cec_s_log_addrs(struct cec_adapter *adap,
 {
        int err;
 
-       if (WARN_ON(adap->capabilities & CEC_CAP_LOG_ADDRS))
-               return -EINVAL;
        mutex_lock(&adap->lock);
        err = __cec_s_log_addrs(adap, log_addrs, block);
        mutex_unlock(&adap->lock);