Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 773 → Rev 774

/shark/trunk/drivers/cm7326/saa7146_i2c.c
215,19 → 215,19
saa7146_write(dev, MC2, (MASK_00 | MASK_16));
 
/* do not poll for i2c-status before upload is complete */
timeout = jiffies + HZ/100 + 1; /* 10ms */
timeout = jiffies26 + HZ/100 + 1; /* 10ms */
while(1) {
mc2 = (saa7146_read(dev, MC2) & 0x1);
if( 0 != mc2 ) {
break;
}
if (time_after(jiffies,timeout)) {
if (jiffies26-timeout>0) {
printk(KERN_WARNING "saa7146_i2c_writeout: timed out waiting for MC2\n");
return -EIO;
}
}
/* wait until we get a transfer done or error */
timeout = jiffies + HZ/100 + 1; /* 10ms */
timeout = jiffies26 + HZ/100 + 1; /* 10ms */
while(1) {
/**
* first read usually delivers bogus results...
236,7 → 236,7
status = saa7146_i2c_status(dev);
if ((status & 0x3) != 1)
break;
if (time_after(jiffies,timeout)) {
if (jiffies26-timeout>0) {
/* this is normal when probing the bus
* (no answer from nonexisistant device...)
*/