]> git.karo-electronics.de Git - linux-beck.git/commitdiff
V4L/DVB (4506): TVP5150 routing logic were broken.
authorMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 18 Aug 2006 10:31:10 +0000 (07:31 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 26 Sep 2006 15:30:32 +0000 (12:30 -0300)
As pointed by The Coverity checker, commit
c7c0b34c27bbf0671807e902fbfea6270c8f138d broked input selection.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/tvp5150.c

index b167ffab25202106da0bc956b8304430a48634e8..bc0a4fc27b24452a828e971d906e1918aeff2a27 100644 (file)
@@ -294,7 +294,7 @@ static inline void tvp5150_selmux(struct i2c_client *c)
        if ((decoder->route.output & TVP5150_BLACK_SCREEN) || !decoder->enable)
                input = 8;
 
-       switch (input) {
+       switch (decoder->route.input) {
        case TVP5150_COMPOSITE1:
                input |= 2;
                /* fall through */
@@ -308,6 +308,11 @@ static inline void tvp5150_selmux(struct i2c_client *c)
                break;
        }
 
+       tvp5150_dbg( 1, "Selecting video route: route input=%i, output=%i "
+                       "=> tvp5150 input=%i, opmode=%i\n",
+                       decoder->route.input,decoder->route.output,
+                       input, opmode );
+
        tvp5150_write(c, TVP5150_OP_MODE_CTL, opmode);
        tvp5150_write(c, TVP5150_VD_IN_SRC_SEL_1, input);
 };