diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2010-04-18 13:48:29 +0200 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-05-06 11:12:11 +0800 |
commit | 6ae87fe219ce32ea226254ee72e1d38ad35d9deb (patch) | |
tree | b18fe5df3016e0fb54ac52731e65a6b26b4965e9 /arch/arm/mach-pxa/viper.c | |
parent | 299ed07868e2384dd3bff44e30892cfdadd7e1bc (diff) | |
download | blackbird-op-linux-6ae87fe219ce32ea226254ee72e1d38ad35d9deb.tar.gz blackbird-op-linux-6ae87fe219ce32ea226254ee72e1d38ad35d9deb.zip |
[ARM] pxa/viper: fix timeout usage for I2C
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 <w.sang@pengutronix.de>
Acked-by: Marc Zyngier <maz@misterjones.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Paul Shen <paul.shen@marvell.com>
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/viper.c')
-rw-r--r-- | arch/arm/mach-pxa/viper.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 9e0c5c3988a1..e90114a7e246 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c @@ -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; |