From 32299a1461ef080e9d8808cf1a762c59403ac63b Mon Sep 17 00:00:00 2001 From: Steven Toth Date: Sat, 31 Jul 2010 16:03:55 -0300 Subject: [PATCH] [media] saa7164: Avoid spurious error after firmware starts Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/saa7164/saa7164-core.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/media/video/saa7164/saa7164-core.c b/drivers/media/video/saa7164/saa7164-core.c index 8879517d974a..b1efbeae8598 100644 --- a/drivers/media/video/saa7164/saa7164-core.c +++ b/drivers/media/video/saa7164/saa7164-core.c @@ -163,14 +163,21 @@ static void saa7164_ts_verifier(struct saa7164_buffer *buf) } - if (port->v_cc_errors) + /* Only report errors if we've been through this function atleast + * once already and the cached cc values are primed. First time through + * always generates errors. + */ + if (port->v_cc_errors && (port->done_first_interrupt > 1)) printk(KERN_ERR "video pid cc, %d errors\n", port->v_cc_errors); - if (port->a_cc_errors) + if (port->a_cc_errors && (port->done_first_interrupt > 1)) printk(KERN_ERR "audio pid cc, %d errors\n", port->a_cc_errors); - if (port->sync_errors) + if (port->sync_errors && (port->done_first_interrupt > 1)) printk(KERN_ERR "sync_errors = %d\n", port->sync_errors); + + if (port->done_first_interrupt == 1) + port->done_first_interrupt++; } static void saa7164_histogram_reset(struct saa7164_histogram *hg, char *name) -- 2.34.1