[ARM] pxa/viper: fix timeout usage for I2C
authorWolfram Sang <[email protected]>
Sun, 18 Apr 2010 11:48:29 +0000 (13:48 +0200)
committerEric Miao <[email protected]>
Thu, 6 May 2010 03:12:11 +0000 (11:12 +0800)
The timeout value is in jiffies, so it should be using HZ, not a plain
number. Assume with HZ=100 '100' means 1s here and adapt accordingly.

Signed-off-by: Wolfram Sang <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
Cc: Russell King <[email protected]>
Cc: Paul Shen <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Jean Delvare <[email protected]>
Signed-off-by: Eric Miao <[email protected]>
arch/arm/mach-pxa/viper.c

index 9e0c5c3988a1f3fae23ee3dd585c135ab54e95a0..e90114a7e246ad4627db5ece88d0b2d159b677fa 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/pm.h>
 #include <linux/sched.h>
 #include <linux/gpio.h>
+#include <linux/jiffies.h>
 #include <linux/i2c-gpio.h>
 #include <linux/serial_8250.h>
 #include <linux/smc91x.h>
@@ -454,7 +455,7 @@ static struct i2c_gpio_platform_data i2c_bus_data = {
        .sda_pin = VIPER_RTC_I2C_SDA_GPIO,
        .scl_pin = VIPER_RTC_I2C_SCL_GPIO,
        .udelay  = 10,
-       .timeout = 100,
+       .timeout = HZ,
 };
 
 static struct platform_device i2c_bus_device = {
@@ -779,7 +780,7 @@ static void __init viper_tpm_init(void)
                .sda_pin = VIPER_TPM_I2C_SDA_GPIO,
                .scl_pin = VIPER_TPM_I2C_SCL_GPIO,
                .udelay  = 10,
-               .timeout = 100,
+               .timeout = HZ,
        };
        char *errstr;