提交 082a4cf8 编写于 作者: J Jean Delvare

i2c: Make sure i2c_algo_bit_data.timeout is HZ-independent

i2c_algo_bit_data.timeout is supposed to be in jiffies, so drivers
should use set this value in terms of HZ.

Ultimately I think this field should be discarded in favor of
i2c_adapter.timeout, but that's left for a future patch.
Signed-off-by: NJean Delvare <khali@linux-fr.org>
Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Acked-by: NLennert Buytenhek <kernel@wantstofly.org>
Acked-by: NLen Sorensen <lsorense@csclub.uwaterloo.ca>
上级 cd97f39b
......@@ -79,7 +79,7 @@ static struct i2c_algo_bit_data ioc_data = {
.getsda = ioc_getsda,
.getscl = ioc_getscl,
.udelay = 80,
.timeout = 100
.timeout = HZ,
};
static struct i2c_adapter ioc_ops = {
......
......@@ -114,7 +114,7 @@ static int ixp2000_i2c_probe(struct platform_device *plat_dev)
drv_data->algo_data.getsda = ixp2000_bit_getsda;
drv_data->algo_data.getscl = ixp2000_bit_getscl;
drv_data->algo_data.udelay = 6;
drv_data->algo_data.timeout = 100;
drv_data->algo_data.timeout = HZ;
strlcpy(drv_data->adapter.name, plat_dev->dev.driver->name,
sizeof(drv_data->adapter.name));
......
......@@ -76,7 +76,7 @@ static struct i2c_algo_bit_data scx200_i2c_data = {
.getsda = scx200_i2c_getsda,
.getscl = scx200_i2c_getscl,
.udelay = 10,
.timeout = 100,
.timeout = HZ,
};
static struct i2c_adapter scx200_i2c_ops = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册