/** * octeon_i2c_wait - wait for the IFLG to be set. * @i2c: The struct octeon_i2c. * * Returns 0 on success, otherwise a negative errno. */ static int octeon_i2c_wait(struct octeon_i2c *i2c) { int result; octeon_i2c_int_enable(i2c); result = wait_event_interruptible_timeout(i2c->queue, octeon_i2c_test_iflg(i2c), i2c->adap.timeout); octeon_i2c_int_disable(i2c); if (result < 0) { dev_dbg(i2c->dev, "%s: wait interrupted\n", __func__); return result; } else if (result == 0) { dev_dbg(i2c->dev, "%s: timeout\n", __func__); <<<<<<< HEAD
/** * octeon_i2c_wait - wait for the IFLG to be set. * @i2c: The struct octeon_i2c. * * Returns 0 on success, otherwise a negative errno. */ static int octeon_i2c_wait(struct octeon_i2c *i2c) { long result; octeon_i2c_int_enable(i2c); result = wait_event_timeout(i2c->queue, octeon_i2c_test_iflg(i2c), i2c->adap.timeout); octeon_i2c_int_disable(i2c); if (result == 0) { dev_dbg(i2c->dev, "%s: timeout\n", __func__); return -ETIMEDOUT; } return 0; }