diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2010-04-18 07:48:29 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-05-05 23:12:11 -0400 |
commit | 6ae87fe219ce32ea226254ee72e1d38ad35d9deb (patch) | |
tree | b18fe5df3016e0fb54ac52731e65a6b26b4965e9 /arch/arm/mach-pxa/viper.c | |
parent | 299ed07868e2384dd3bff44e30892cfdadd7e1bc (diff) |
[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 @@ | |||
34 | #include <linux/pm.h> | 34 | #include <linux/pm.h> |
35 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
36 | #include <linux/gpio.h> | 36 | #include <linux/gpio.h> |
37 | #include <linux/jiffies.h> | ||
37 | #include <linux/i2c-gpio.h> | 38 | #include <linux/i2c-gpio.h> |
38 | #include <linux/serial_8250.h> | 39 | #include <linux/serial_8250.h> |
39 | #include <linux/smc91x.h> | 40 | #include <linux/smc91x.h> |
@@ -454,7 +455,7 @@ static struct i2c_gpio_platform_data i2c_bus_data = { | |||
454 | .sda_pin = VIPER_RTC_I2C_SDA_GPIO, | 455 | .sda_pin = VIPER_RTC_I2C_SDA_GPIO, |
455 | .scl_pin = VIPER_RTC_I2C_SCL_GPIO, | 456 | .scl_pin = VIPER_RTC_I2C_SCL_GPIO, |
456 | .udelay = 10, | 457 | .udelay = 10, |
457 | .timeout = 100, | 458 | .timeout = HZ, |
458 | }; | 459 | }; |
459 | 460 | ||
460 | static struct platform_device i2c_bus_device = { | 461 | static struct platform_device i2c_bus_device = { |
@@ -779,7 +780,7 @@ static void __init viper_tpm_init(void) | |||
779 | .sda_pin = VIPER_TPM_I2C_SDA_GPIO, | 780 | .sda_pin = VIPER_TPM_I2C_SDA_GPIO, |
780 | .scl_pin = VIPER_TPM_I2C_SCL_GPIO, | 781 | .scl_pin = VIPER_TPM_I2C_SCL_GPIO, |
781 | .udelay = 10, | 782 | .udelay = 10, |
782 | .timeout = 100, | 783 | .timeout = HZ, |
783 | }; | 784 | }; |
784 | char *errstr; | 785 | char *errstr; |
785 | 786 | ||