[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1365590202-1623-6-git-send-email-mika.westerberg@linux.intel.com>
Date: Wed, 10 Apr 2013 13:36:41 +0300
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: linux-kernel@...r.kernel.org
Cc: linux-i2c@...r.kernel.org, Wolfram Sang <wsa@...-dreams.de>,
ben-linux@...ff.org, Jean Delvare <khali@...ux-fr.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Christian Ruppert <christian.ruppert@...lis.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>
Subject: [PATCH v2 6/7] 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@...ux.intel.com>
---
drivers/i2c/busses/i2c-designware-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c
index 5cc4ebf..7c10c5b 100644
--- a/drivers/i2c/busses/i2c-designware-core.c
+++ b/drivers/i2c/busses/i2c-designware-core.c
@@ -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;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists