Skip to content

Commit

Permalink
i2c-designware: use usleep_range() in the busy-loop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mika Westerberg authored and Wolfram Sang committed Apr 15, 2013
1 parent 3ca4ed8 commit 1451b91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-designware-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1451b91

Please sign in to comment.