[media] tm6000: Implement I2C flush callback
authorThierry Reding <thierry.reding@avionic-design.de>
Thu, 4 Aug 2011 07:14:03 +0000 (04:14 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 31 Aug 2011 20:17:06 +0000 (17:17 -0300)
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/tm6000/tm6000-cards.c
drivers/staging/tm6000/tm6000-i2c.c

index 7dbc500bc1121aa52929c6bd9367fd2e3a59758c..bac4309a386835a9c3a5cf16d6deaffc29903630 100644 (file)
@@ -780,6 +780,11 @@ int tm6000_tuner_callback(void *ptr, int component, int command, int arg)
                        rc = tm6000_i2c_reset(dev, 100);
                        break;
                }
+               break;
+       case XC2028_I2C_FLUSH:
+               tm6000_set_reg(dev, REQ_50_SET_START, 0, 0);
+               tm6000_set_reg(dev, REQ_51_SET_STOP, 0, 0);
+               break;
        }
        return rc;
 }
index 5a651ea5f60afbabe5df852d720e0b9750332eec..76a8e3a49fc7d509628bc72ace549828934337d5 100644 (file)
@@ -219,11 +219,6 @@ static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap,
                                        printk(" %02x", msgs[i].buf[byte]);
                        rc = tm6000_i2c_send_regs(dev, addr, msgs[i].buf[0],
                                msgs[i].buf + 1, msgs[i].len - 1);
-
-                       if (addr == dev->tuner_addr  << 1) {
-                               tm6000_set_reg(dev, REQ_50_SET_START, 0, 0);
-                               tm6000_set_reg(dev, REQ_51_SET_STOP, 0, 0);
-                       }
                }
                if (i2c_debug >= 2)
                        printk("\n");