提交 2e60ad17 编写于 作者: J Jose Abreu 提交者: Mauro Carvalho Chehab

[media] i2c: adv7842: Use cec_get_drvdata()

Use helper function to get driver private data from CEC
adapter.
Signed-off-by: NJose Abreu <joabreu@synopsys.com>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 eb10790f
...@@ -2250,7 +2250,7 @@ static void adv7842_cec_isr(struct v4l2_subdev *sd, bool *handled) ...@@ -2250,7 +2250,7 @@ static void adv7842_cec_isr(struct v4l2_subdev *sd, bool *handled)
static int adv7842_cec_adap_enable(struct cec_adapter *adap, bool enable) static int adv7842_cec_adap_enable(struct cec_adapter *adap, bool enable)
{ {
struct adv7842_state *state = adap->priv; struct adv7842_state *state = cec_get_drvdata(adap);
struct v4l2_subdev *sd = &state->sd; struct v4l2_subdev *sd = &state->sd;
if (!state->cec_enabled_adap && enable) { if (!state->cec_enabled_adap && enable) {
...@@ -2279,7 +2279,7 @@ static int adv7842_cec_adap_enable(struct cec_adapter *adap, bool enable) ...@@ -2279,7 +2279,7 @@ static int adv7842_cec_adap_enable(struct cec_adapter *adap, bool enable)
static int adv7842_cec_adap_log_addr(struct cec_adapter *adap, u8 addr) static int adv7842_cec_adap_log_addr(struct cec_adapter *adap, u8 addr)
{ {
struct adv7842_state *state = adap->priv; struct adv7842_state *state = cec_get_drvdata(adap);
struct v4l2_subdev *sd = &state->sd; struct v4l2_subdev *sd = &state->sd;
unsigned int i, free_idx = ADV7842_MAX_ADDRS; unsigned int i, free_idx = ADV7842_MAX_ADDRS;
...@@ -2334,7 +2334,7 @@ static int adv7842_cec_adap_log_addr(struct cec_adapter *adap, u8 addr) ...@@ -2334,7 +2334,7 @@ static int adv7842_cec_adap_log_addr(struct cec_adapter *adap, u8 addr)
static int adv7842_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, static int adv7842_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
u32 signal_free_time, struct cec_msg *msg) u32 signal_free_time, struct cec_msg *msg)
{ {
struct adv7842_state *state = adap->priv; struct adv7842_state *state = cec_get_drvdata(adap);
struct v4l2_subdev *sd = &state->sd; struct v4l2_subdev *sd = &state->sd;
u8 len = msg->len; u8 len = msg->len;
unsigned int i; unsigned int i;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册