Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Jean Delvare <khali@linux-fr.org>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Lennert Buytenhek <kernel@wantstofly.org>
Acked-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>

+3 -3
+1 -1
drivers/i2c/busses/i2c-acorn.c
··· 79 79 .getsda = ioc_getsda, 80 80 .getscl = ioc_getscl, 81 81 .udelay = 80, 82 - .timeout = 100 82 + .timeout = HZ, 83 83 }; 84 84 85 85 static struct i2c_adapter ioc_ops = {
+1 -1
drivers/i2c/busses/i2c-ixp2000.c
··· 114 114 drv_data->algo_data.getsda = ixp2000_bit_getsda; 115 115 drv_data->algo_data.getscl = ixp2000_bit_getscl; 116 116 drv_data->algo_data.udelay = 6; 117 - drv_data->algo_data.timeout = 100; 117 + drv_data->algo_data.timeout = HZ; 118 118 119 119 strlcpy(drv_data->adapter.name, plat_dev->dev.driver->name, 120 120 sizeof(drv_data->adapter.name));
+1 -1
drivers/i2c/busses/scx200_i2c.c
··· 76 76 .getsda = scx200_i2c_getsda, 77 77 .getscl = scx200_i2c_getscl, 78 78 .udelay = 10, 79 - .timeout = 100, 79 + .timeout = HZ, 80 80 }; 81 81 82 82 static struct i2c_adapter scx200_i2c_ops = {