[media] adv7842: return 0 if no change in s_dv_timings
authorMartin Bugge <marbugge@cisco.com>
Thu, 12 Dec 2013 13:10:57 +0000 (10:10 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 7 Jan 2014 08:46:57 +0000 (06:46 -0200)
Return 0 if the new timings are equal to the current timings as
it caused extra cp-loss/lock interrupts.

Signed-off-by: Martin Bugge <marbugge@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/i2c/adv7842.c

index ba748637b7ca660fee182272262f573a7c513f7d..c69711756c8eb7d99cfe34b11b2c9531586e926b 100644 (file)
@@ -1453,6 +1453,11 @@ static int adv7842_s_dv_timings(struct v4l2_subdev *sd,
        if (state->mode == ADV7842_MODE_SDP)
                return -ENODATA;
 
+       if (v4l2_match_dv_timings(&state->timings, timings, 0)) {
+               v4l2_dbg(1, debug, sd, "%s: no change\n", __func__);
+               return 0;
+       }
+
        bt = &timings->bt;
 
        if (!v4l2_valid_dv_timings(timings, adv7842_get_dv_timings_cap(sd),