提交 efd2c611 编写于 作者: W Wolfram Sang 提交者: Wolfram Sang

i2c: rcar: use adapter default for timeout

5 seconds is a very large timeout, and it is hardcoded. Use the default
timeout from 'struct adapter' which is 1 second. It can also be modified
from userspace for specific workloads via i2c-dev.
Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 edfc3901
......@@ -532,7 +532,7 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
timeout = wait_event_timeout(priv->wait,
rcar_i2c_flags_has(priv, ID_DONE),
5 * HZ);
adap->timeout);
if (!timeout) {
ret = -ETIMEDOUT;
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册