Commit ff4f80fd authored by Mats Randgaard's avatar Mats Randgaard Committed by Mauro Carvalho Chehab

[media] adv7604: return immediately if the new input is equal to what is configured

Signed-off-by: default avatarMats Randgaard <matrandg@cisco.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 94b13013
...@@ -1479,7 +1479,11 @@ static int adv7604_s_routing(struct v4l2_subdev *sd, ...@@ -1479,7 +1479,11 @@ static int adv7604_s_routing(struct v4l2_subdev *sd,
{ {
struct adv7604_state *state = to_state(sd); struct adv7604_state *state = to_state(sd);
v4l2_dbg(2, debug, sd, "%s: input %d", __func__, input); v4l2_dbg(2, debug, sd, "%s: input %d, selected input %d",
__func__, input, state->selected_input);
if (input == state->selected_input)
return 0;
state->selected_input = input; state->selected_input = input;
...@@ -1524,6 +1528,8 @@ static int adv7604_isr(struct v4l2_subdev *sd, u32 status, bool *handled) ...@@ -1524,6 +1528,8 @@ static int adv7604_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
u8 fmt_change, fmt_change_digital, tx_5v; u8 fmt_change, fmt_change_digital, tx_5v;
u32 input_status; u32 input_status;
v4l2_dbg(2, debug, sd, "%s: ", __func__);
/* format change */ /* format change */
fmt_change = io_read(sd, 0x43) & 0x98; fmt_change = io_read(sd, 0x43) & 0x98;
if (fmt_change) if (fmt_change)
...@@ -2124,6 +2130,7 @@ static int adv7604_probe(struct i2c_client *client, ...@@ -2124,6 +2130,7 @@ static int adv7604_probe(struct i2c_client *client,
/* initialize variables */ /* initialize variables */
state->restart_stdi_once = true; state->restart_stdi_once = true;
state->prev_input_status = ~0; state->prev_input_status = ~0;
state->selected_input = ~0;
/* platform data */ /* platform data */
if (!pdata) { if (!pdata) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment