diff options
Diffstat (limited to 'drivers/media/common/saa7146_i2c.c')
-rw-r--r-- | drivers/media/common/saa7146_i2c.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/common/saa7146_i2c.c b/drivers/media/common/saa7146_i2c.c index fec6beab8c28..8aabdd8fb3c5 100644 --- a/drivers/media/common/saa7146_i2c.c +++ b/drivers/media/common/saa7146_i2c.c | |||
@@ -276,8 +276,8 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in | |||
276 | int i = 0, count = 0; | 276 | int i = 0, count = 0; |
277 | u32* buffer = dev->d_i2c.cpu_addr; | 277 | u32* buffer = dev->d_i2c.cpu_addr; |
278 | int err = 0; | 278 | int err = 0; |
279 | int address_err = 0; | 279 | int address_err = 0; |
280 | int short_delay = 0; | 280 | int short_delay = 0; |
281 | 281 | ||
282 | if (down_interruptible (&dev->i2c_lock)) | 282 | if (down_interruptible (&dev->i2c_lock)) |
283 | return -ERESTARTSYS; | 283 | return -ERESTARTSYS; |
@@ -325,7 +325,7 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in | |||
325 | if( 0 != (SAA7146_USE_I2C_IRQ & dev->ext->flags)) { | 325 | if( 0 != (SAA7146_USE_I2C_IRQ & dev->ext->flags)) { |
326 | goto out; | 326 | goto out; |
327 | } | 327 | } |
328 | address_err++; | 328 | address_err++; |
329 | } | 329 | } |
330 | DEB_I2C(("error while sending message(s). starting again.\n")); | 330 | DEB_I2C(("error while sending message(s). starting again.\n")); |
331 | break; | 331 | break; |
@@ -336,14 +336,14 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in | |||
336 | break; | 336 | break; |
337 | } | 337 | } |
338 | 338 | ||
339 | /* delay a bit before retrying */ | 339 | /* delay a bit before retrying */ |
340 | msleep(10); | 340 | msleep(10); |
341 | 341 | ||
342 | } while (err != num && retries--); | 342 | } while (err != num && retries--); |
343 | 343 | ||
344 | /* if every retry had an address error, exit right away */ | 344 | /* if every retry had an address error, exit right away */ |
345 | if (address_err == retries) { | 345 | if (address_err == retries) { |
346 | goto out; | 346 | goto out; |
347 | } | 347 | } |
348 | 348 | ||
349 | /* if any things had to be read, get the results */ | 349 | /* if any things had to be read, get the results */ |