while (limit-- > 0) {
u8 val;
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
*status = val = readb(bp->i2c_control_regs + 0);
if ((val & I2C_PCF_PIN) == 0) {
ret = 0;
break;
}
- schedule_timeout(HZ/4);
+ msleep_interruptible(250);
}
remove_wait_queue(&bp->wq, &wait);
bp->waiting = 0;