aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorMats Randgaard <matrandg@cisco.com>2013-12-05 08:24:05 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-07 03:07:07 -0500
commitff4f80fdfaefb7906ed58ec36248591687f927b5 (patch)
treebb34b539e067608a17fbf995dc2ee8bbb39c4dc9 /drivers/media/i2c
parent94b130131115de6c7c6b6228379e61d270ab8966 (diff)
[media] adv7604: return immediately if the new input is equal to what is configured
Signed-off-by: Mats Randgaard <matrandg@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/adv7604.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index c85f86c9c605..4e7d39a5b20e 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -1479,7 +1479,11 @@ static int adv7604_s_routing(struct v4l2_subdev *sd,
1479{ 1479{
1480 struct adv7604_state *state = to_state(sd); 1480 struct adv7604_state *state = to_state(sd);
1481 1481
1482 v4l2_dbg(2, debug, sd, "%s: input %d", __func__, input); 1482 v4l2_dbg(2, debug, sd, "%s: input %d, selected input %d",
1483 __func__, input, state->selected_input);
1484
1485 if (input == state->selected_input)
1486 return 0;
1483 1487
1484 state->selected_input = input; 1488 state->selected_input = input;
1485 1489
@@ -1524,6 +1528,8 @@ static int adv7604_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
1524 u8 fmt_change, fmt_change_digital, tx_5v; 1528 u8 fmt_change, fmt_change_digital, tx_5v;
1525 u32 input_status; 1529 u32 input_status;
1526 1530
1531 v4l2_dbg(2, debug, sd, "%s: ", __func__);
1532
1527 /* format change */ 1533 /* format change */
1528 fmt_change = io_read(sd, 0x43) & 0x98; 1534 fmt_change = io_read(sd, 0x43) & 0x98;
1529 if (fmt_change) 1535 if (fmt_change)
@@ -2124,6 +2130,7 @@ static int adv7604_probe(struct i2c_client *client,
2124 /* initialize variables */ 2130 /* initialize variables */
2125 state->restart_stdi_once = true; 2131 state->restart_stdi_once = true;
2126 state->prev_input_status = ~0; 2132 state->prev_input_status = ~0;
2133 state->selected_input = ~0;
2127 2134
2128 /* platform data */ 2135 /* platform data */
2129 if (!pdata) { 2136 if (!pdata) {