Commit 1451b91f authored by Mika Westerberg's avatar Mika Westerberg Committed by Wolfram Sang

i2c-designware: use usleep_range() in the busy-loop

This is not an atomic context so there is no need to use mdelay() but
instead use usleep_range().
Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 3ca4ed87
...@@ -355,7 +355,7 @@ static int i2c_dw_wait_bus_not_busy(struct dw_i2c_dev *dev) ...@@ -355,7 +355,7 @@ static int i2c_dw_wait_bus_not_busy(struct dw_i2c_dev *dev)
return -ETIMEDOUT; return -ETIMEDOUT;
} }
timeout--; timeout--;
mdelay(1); usleep_range(1000, 1100);
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment