diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/common/saa7146_i2c.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/common/saa7146_i2c.c b/drivers/media/common/saa7146_i2c.c index d9953f7a8b6b..5297a365c928 100644 --- a/drivers/media/common/saa7146_i2c.c +++ b/drivers/media/common/saa7146_i2c.c | |||
@@ -217,11 +217,9 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d | |||
217 | } | 217 | } |
218 | /* wait until we get a transfer done or error */ | 218 | /* wait until we get a transfer done or error */ |
219 | timeout = jiffies + HZ/100 + 1; /* 10ms */ | 219 | timeout = jiffies + HZ/100 + 1; /* 10ms */ |
220 | /* first read usually delivers bogus results... */ | ||
221 | saa7146_i2c_status(dev); | ||
220 | while(1) { | 222 | while(1) { |
221 | /** | ||
222 | * first read usually delivers bogus results... | ||
223 | */ | ||
224 | saa7146_i2c_status(dev); | ||
225 | status = saa7146_i2c_status(dev); | 223 | status = saa7146_i2c_status(dev); |
226 | if ((status & 0x3) != 1) | 224 | if ((status & 0x3) != 1) |
227 | break; | 225 | break; |
@@ -232,10 +230,10 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d | |||
232 | DEB_I2C(("saa7146_i2c_writeout: timed out waiting for end of xfer\n")); | 230 | DEB_I2C(("saa7146_i2c_writeout: timed out waiting for end of xfer\n")); |
233 | return -EIO; | 231 | return -EIO; |
234 | } | 232 | } |
235 | if ((++trial < 20) && short_delay) | 233 | if (++trial < 50 && short_delay) |
236 | udelay(10); | 234 | udelay(10); |
237 | else | 235 | else |
238 | msleep(1); | 236 | msleep(1); |
239 | } | 237 | } |
240 | } | 238 | } |
241 | 239 | ||