summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2003-11-26 13:27:21 +0000
committerMichael Hunold <devnull@localhost>2003-11-26 13:27:21 +0000
commit2ff4f7e679d65787de5a6b0099b0786bbe8dc202 (patch)
tree355faf9ae2b29a86aa58f9ccd4af2051beb51b90 /linux/drivers
parent4dd80cf223739017a7b3069949e147e29dc0c283 (diff)
downloadmediapointer-dvb-s2-2ff4f7e679d65787de5a6b0099b0786bbe8dc202.tar.gz
mediapointer-dvb-s2-2ff4f7e679d65787de5a6b0099b0786bbe8dc202.tar.bz2
- i2c timeout fix by Gerd Knorr
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/common/saa7146_i2c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c
index 5db9ef621..699fedd32 100644
--- a/linux/drivers/media/common/saa7146_i2c.c
+++ b/linux/drivers/media/common/saa7146_i2c.c
@@ -186,7 +186,7 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
{
u32 status = 0, mc2 = 0;
int trial = 0;
- int timeout;
+ unsigned long timeout;
/* write out i2c-command */
DEB_I2C(("before: 0x%08x (status: 0x%08x), %d\n",*dword,saa7146_read(dev, I2C_STATUS), dev->i2c_op));
@@ -218,7 +218,7 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
if( 0 != mc2 ) {
break;
}
- if (jiffies > timeout) {
+ if (time_after(jiffies,timeout)) {
printk(KERN_WARNING "saa7146_i2c_writeout: timed out waiting for MC2\n");
return -EIO;
}
@@ -233,7 +233,7 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
status = saa7146_i2c_status(dev);
if ((status & 0x3) != 1)
break;
- if (jiffies > timeout) {
+ if (time_after(jiffies,timeout)) {
/* this is normal when probing the bus
* (no answer from nonexisistant device...)
*/