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:
Mika Westerberg 2013-04-10 00:36:41 +00:00 committed by Wolfram Sang
parent 3ca4ed8715
commit 1451b91ffe

View File

@ -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;