i2c-designware: use usleep_range() in the busy-loop
authorMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 10 Apr 2013 00:36:41 +0000 (00:36 +0000)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 15 Apr 2013 16:18:14 +0000 (18:18 +0200)
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>
drivers/i2c/busses/i2c-designware-core.c

index 5cc4ebf..7c10c5b 100644 (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;