V4L/DVB (5495): Tda10086: fix DiSEqC message length
authorAndreas Oberritter <obi@linuxtv.org>
Sun, 1 Apr 2007 22:29:16 +0000 (19:29 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 2 Apr 2007 14:03:04 +0000 (11:03 -0300)
Setting the message length to zero means to send one byte, so you need a
subtraction instead of an addition.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/frontends/tda10086.c

index 4c27a2d..ccc429c 100644 (file)
@@ -212,7 +212,7 @@ static int tda10086_send_master_cmd (struct dvb_frontend* fe,
        for(i=0; i< cmd->msg_len; i++) {
                tda10086_write_byte(state, 0x48+i, cmd->msg[i]);
        }
-       tda10086_write_byte(state, 0x36, 0x08 | ((cmd->msg_len + 1) << 4));
+       tda10086_write_byte(state, 0x36, 0x08 | ((cmd->msg_len - 1) << 4));
 
        tda10086_diseqc_wait(state);