diff options
Diffstat (limited to 'drivers/media/common/saa7146_i2c.c')
-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 48cb154c7a46..b2ba9dc0dd6d 100644 --- a/drivers/media/common/saa7146_i2c.c +++ b/drivers/media/common/saa7146_i2c.c | |||
@@ -161,7 +161,7 @@ static int saa7146_i2c_reset(struct saa7146_dev *dev) | |||
161 | msleep(SAA7146_I2C_DELAY); | 161 | msleep(SAA7146_I2C_DELAY); |
162 | } | 162 | } |
163 | 163 | ||
164 | /* if any error is still present, a fatal error has occured ... */ | 164 | /* if any error is still present, a fatal error has occurred ... */ |
165 | status = saa7146_i2c_status(dev); | 165 | status = saa7146_i2c_status(dev); |
166 | if ( dev->i2c_bitrate != status ) { | 166 | if ( dev->i2c_bitrate != status ) { |
167 | DEB_I2C(("fatal error. status:0x%08x\n",status)); | 167 | DEB_I2C(("fatal error. status:0x%08x\n",status)); |
@@ -326,9 +326,9 @@ static int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *m | |||
326 | if ( 0 != err) { | 326 | if ( 0 != err) { |
327 | /* this one is unsatisfying: some i2c slaves on some | 327 | /* this one is unsatisfying: some i2c slaves on some |
328 | dvb cards don't acknowledge correctly, so the saa7146 | 328 | dvb cards don't acknowledge correctly, so the saa7146 |
329 | thinks that an address error occured. in that case, the | 329 | thinks that an address error occurred. in that case, the |
330 | transaction should be retrying, even if an address error | 330 | transaction should be retrying, even if an address error |
331 | occured. analog saa7146 based cards extensively rely on | 331 | occurred. analog saa7146 based cards extensively rely on |
332 | i2c address probing, however, and address errors indicate that a | 332 | i2c address probing, however, and address errors indicate that a |
333 | device is really *not* there. retrying in that case | 333 | device is really *not* there. retrying in that case |
334 | increases the time the device needs to probe greatly, so | 334 | increases the time the device needs to probe greatly, so |
@@ -365,7 +365,7 @@ static int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *m | |||
365 | DEB_I2C(("transmission successful. (msg:%d).\n",err)); | 365 | DEB_I2C(("transmission successful. (msg:%d).\n",err)); |
366 | out: | 366 | out: |
367 | /* another bug in revision 0: the i2c-registers get uploaded randomly by other | 367 | /* another bug in revision 0: the i2c-registers get uploaded randomly by other |
368 | uploads, so we better clear them out before continueing */ | 368 | uploads, so we better clear them out before continuing */ |
369 | if( 0 == dev->revision ) { | 369 | if( 0 == dev->revision ) { |
370 | __le32 zero = 0; | 370 | __le32 zero = 0; |
371 | saa7146_i2c_reset(dev); | 371 | saa7146_i2c_reset(dev); |
@@ -391,7 +391,6 @@ static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, in | |||
391 | 391 | ||
392 | /*****************************************************************************/ | 392 | /*****************************************************************************/ |
393 | /* i2c-adapter helper functions */ | 393 | /* i2c-adapter helper functions */ |
394 | #include <linux/i2c-id.h> | ||
395 | 394 | ||
396 | /* exported algorithm data */ | 395 | /* exported algorithm data */ |
397 | static struct i2c_algorithm saa7146_algo = { | 396 | static struct i2c_algorithm saa7146_algo = { |
@@ -414,7 +413,6 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c | |||
414 | i2c_adapter->dev.parent = &dev->pci->dev; | 413 | i2c_adapter->dev.parent = &dev->pci->dev; |
415 | i2c_adapter->algo = &saa7146_algo; | 414 | i2c_adapter->algo = &saa7146_algo; |
416 | i2c_adapter->algo_data = NULL; | 415 | i2c_adapter->algo_data = NULL; |
417 | i2c_adapter->id = I2C_HW_SAA7146; | ||
418 | i2c_adapter->timeout = SAA7146_I2C_TIMEOUT; | 416 | i2c_adapter->timeout = SAA7146_I2C_TIMEOUT; |
419 | i2c_adapter->retries = SAA7146_I2C_RETRIES; | 417 | i2c_adapter->retries = SAA7146_I2C_RETRIES; |
420 | } | 418 | } |