V4L/DVB (6027): Get rid of an ill-behaved msleep in i2c write
[pandora-kernel.git] / drivers / media / video / ov7670.c
index f8f21dd..c4c5bd6 100644 (file)
@@ -416,7 +416,10 @@ static int ov7670_read(struct i2c_client *c, unsigned char reg,
 static int ov7670_write(struct i2c_client *c, unsigned char reg,
                unsigned char value)
 {
-       return i2c_smbus_write_byte_data(c, reg, value);
+       int ret = i2c_smbus_write_byte_data(c, reg, value);
+       if (reg == REG_COM7 && (value & COM7_RESET))
+               msleep(2);  /* Wait for reset to run */
+       return ret;
 }