cpu_relax/ yield replaced with better flexible approach in kernel with cond_resched. Signed-off-by: Anindya Sundar Gayen <anindya.sg@xxxxxxxxxxx> --- drivers/i2c/algos/i2c-algo-bit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c index eddf25b90ca8..4168fd901957 100644 --- a/drivers/i2c/algos/i2c-algo-bit.c +++ b/drivers/i2c/algos/i2c-algo-bit.c @@ -97,7 +97,7 @@ static int sclhi(struct i2c_algo_bit_data *adap) break; return -ETIMEDOUT; } - cpu_relax(); + cond_resched(); } #ifdef DEBUG if (jiffies != start && i2c_debug >= 3) @@ -329,7 +329,7 @@ static int try_address(struct i2c_adapter *i2c_adap, bit_dbg(3, &i2c_adap->dev, "emitting stop condition\n"); i2c_stop(adap); udelay(adap->udelay); - yield(); + cond_resched(); bit_dbg(3, &i2c_adap->dev, "emitting start condition\n"); i2c_start(adap); } -- 2.17.1