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: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
3ca4ed8715
commit
1451b91ffe
|
@ -355,7 +355,7 @@ static int i2c_dw_wait_bus_not_busy(struct dw_i2c_dev *dev)
|
|||
return -ETIMEDOUT;
|
||||
}
|
||||
timeout--;
|
||||
mdelay(1);
|
||||
usleep_range(1000, 1100);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue