linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Fjeldtvedt <jaffe1@gmail.com>
To: linux-media@vger.kernel.org
Cc: Johan Fjeldtvedt <jaffe1@gmail.com>
Subject: [PATCHv2 1/4] cec: allow configuration both from within driver and from user space
Date: Mon, 22 Aug 2016 11:04:51 +0200	[thread overview]
Message-ID: <1471856694-14182-2-git-send-email-jaffe1@gmail.com> (raw)
In-Reply-To: <1471856694-14182-1-git-send-email-jaffe1@gmail.com>

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>
---
 drivers/staging/media/cec/cec-adap.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/media/cec/cec-adap.c b/drivers/staging/media/cec/cec-adap.c
index b2393bb..608e3e7 100644
--- a/drivers/staging/media/cec/cec-adap.c
+++ b/drivers/staging/media/cec/cec-adap.c
@@ -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);
-- 
2.7.4


  reply	other threads:[~2016-08-22  9:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-22  9:04 [PATCHv2 0/4] pulse8-cec: Add support for storing and optionally restoring config Johan Fjeldtvedt
2016-08-22  9:04 ` Johan Fjeldtvedt [this message]
2016-08-22  9:04 ` [PATCHv2 2/4] pulse8-cec: serialize communication with adapter Johan Fjeldtvedt
2016-08-22  9:04 ` [PATCHv2 3/4] pulse8-cec: add notes about behavior in autonomous mode Johan Fjeldtvedt
2016-09-06 19:33   ` Mauro Carvalho Chehab
2016-08-22  9:04 ` [PATCHv2 4/4] pulse8-cec: sync configuration with adapter Johan Fjeldtvedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471856694-14182-2-git-send-email-jaffe1@gmail.com \
    --to=jaffe1@gmail.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).