Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1608675 > unrolled thread

[PATCH 0/8] Add cec_get_drvdata()

Started byJose Abreu <Jose.Abreu@synopsys.com>
First post2017-03-24 17:50 +0100
Last post2017-03-24 18:00 +0100
Articles 3 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/8] Add cec_get_drvdata() Jose Abreu <Jose.Abreu@synopsys.com> - 2017-03-24 17:50 +0100
    [PATCH 4/8] [media] i2c: adv7511: Use cec_get_drvdata() Jose Abreu <Jose.Abreu@synopsys.com> - 2017-03-24 18:00 +0100
    [PATCH 5/8] [media] i2c: adv7604: Use cec_get_drvdata() Jose Abreu <Jose.Abreu@synopsys.com> - 2017-03-24 18:00 +0100

#1608675 — [PATCH 0/8] Add cec_get_drvdata()

FromJose Abreu <Jose.Abreu@synopsys.com>
Date2017-03-24 17:50 +0100
Subject[PATCH 0/8] Add cec_get_drvdata()
Message-ID<toAzw-4jh-3@gated-at.bofh.it>
Hi,

This series introduces a new helper function called cec_get_drvdata() which
returns the adapter private data and can be used by drivers that use CEC.

Best regards,
Jose Miguel Abreu

Jose Abreu (8):
  [media] cec: Add cec_get_drvdata()
  [media] staging: st-cec: Use cec_get_drvdata()
  [media] staging: s5p-cec: Use cec_get_drvdata()
  [media] i2c: adv7511: Use cec_get_drvdata()
  [media] i2c: adv7604: Use cec_get_drvdata()
  [media] i2c: adv7842: Use cec_get_drvdata()
  [media] usb: pulse8-cec: Use cec_get_drvdata()
  [media] platform: vivid: Use cec_get_drvdata()

 drivers/media/i2c/adv7511.c               | 6 +++---
 drivers/media/i2c/adv7604.c               | 6 +++---
 drivers/media/i2c/adv7842.c               | 6 +++---
 drivers/media/platform/vivid/vivid-cec.c  | 4 ++--
 drivers/media/usb/pulse8-cec/pulse8-cec.c | 6 +++---
 drivers/staging/media/s5p-cec/s5p_cec.c   | 6 +++---
 drivers/staging/media/st-cec/stih-cec.c   | 6 +++---
 include/media/cec.h                       | 5 +++++
 8 files changed, 25 insertions(+), 20 deletions(-)

-- 
1.9.1

[toc] | [next] | [standalone]


#1608679 — [PATCH 4/8] [media] i2c: adv7511: Use cec_get_drvdata()

FromJose Abreu <Jose.Abreu@synopsys.com>
Date2017-03-24 18:00 +0100
Subject[PATCH 4/8] [media] i2c: adv7511: Use cec_get_drvdata()
Message-ID<toAJc-4pW-9@gated-at.bofh.it>
In reply to#1608675
Use helper function to get driver private data from CEC
adapter.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/media/i2c/adv7511.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/i2c/adv7511.c b/drivers/media/i2c/adv7511.c
index 8c9e289..ccc4786 100644
--- a/drivers/media/i2c/adv7511.c
+++ b/drivers/media/i2c/adv7511.c
@@ -734,7 +734,7 @@ static int adv7511_s_power(struct v4l2_subdev *sd, int on)
 #if IS_ENABLED(CONFIG_VIDEO_ADV7511_CEC)
 static int adv7511_cec_adap_enable(struct cec_adapter *adap, bool enable)
 {
-	struct adv7511_state *state = adap->priv;
+	struct adv7511_state *state = cec_get_drvdata(adap);
 	struct v4l2_subdev *sd = &state->sd;
 
 	if (state->i2c_cec == NULL)
@@ -769,7 +769,7 @@ static int adv7511_cec_adap_enable(struct cec_adapter *adap, bool enable)
 
 static int adv7511_cec_adap_log_addr(struct cec_adapter *adap, u8 addr)
 {
-	struct adv7511_state *state = adap->priv;
+	struct adv7511_state *state = cec_get_drvdata(adap);
 	struct v4l2_subdev *sd = &state->sd;
 	unsigned int i, free_idx = ADV7511_MAX_ADDRS;
 
@@ -824,7 +824,7 @@ static int adv7511_cec_adap_log_addr(struct cec_adapter *adap, u8 addr)
 static int adv7511_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
 				     u32 signal_free_time, struct cec_msg *msg)
 {
-	struct adv7511_state *state = adap->priv;
+	struct adv7511_state *state = cec_get_drvdata(adap);
 	struct v4l2_subdev *sd = &state->sd;
 	u8 len = msg->len;
 	unsigned int i;
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1608680 — [PATCH 5/8] [media] i2c: adv7604: Use cec_get_drvdata()

FromJose Abreu <Jose.Abreu@synopsys.com>
Date2017-03-24 18:00 +0100
Subject[PATCH 5/8] [media] i2c: adv7604: Use cec_get_drvdata()
Message-ID<toAJc-4pW-23@gated-at.bofh.it>
In reply to#1608675
Use helper function to get driver private data from CEC
adapter.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/media/i2c/adv7604.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index d8bf435..f1fa9ce 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -2050,7 +2050,7 @@ static void adv76xx_cec_isr(struct v4l2_subdev *sd, bool *handled)
 
 static int adv76xx_cec_adap_enable(struct cec_adapter *adap, bool enable)
 {
-	struct adv76xx_state *state = adap->priv;
+	struct adv76xx_state *state = cec_get_drvdata(adap);
 	struct v4l2_subdev *sd = &state->sd;
 
 	if (!state->cec_enabled_adap && enable) {
@@ -2080,7 +2080,7 @@ static int adv76xx_cec_adap_enable(struct cec_adapter *adap, bool enable)
 
 static int adv76xx_cec_adap_log_addr(struct cec_adapter *adap, u8 addr)
 {
-	struct adv76xx_state *state = adap->priv;
+	struct adv76xx_state *state = cec_get_drvdata(adap);
 	struct v4l2_subdev *sd = &state->sd;
 	unsigned int i, free_idx = ADV76XX_MAX_ADDRS;
 
@@ -2135,7 +2135,7 @@ static int adv76xx_cec_adap_log_addr(struct cec_adapter *adap, u8 addr)
 static int adv76xx_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
 				     u32 signal_free_time, struct cec_msg *msg)
 {
-	struct adv76xx_state *state = adap->priv;
+	struct adv76xx_state *state = cec_get_drvdata(adap);
 	struct v4l2_subdev *sd = &state->sd;
 	u8 len = msg->len;
 	unsigned int i;
-- 
1.9.1

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web