summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/viper.c
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2010-04-18 13:48:29 +0200
committerEric Miao <eric.y.miao@gmail.com>2010-05-06 11:12:11 +0800
commit6ae87fe219ce32ea226254ee72e1d38ad35d9deb (patch)
treeb18fe5df3016e0fb54ac52731e65a6b26b4965e9 /arch/arm/mach-pxa/viper.c
parent299ed07868e2384dd3bff44e30892cfdadd7e1bc (diff)
downloadop-kernel-dev-6ae87fe219ce32ea226254ee72e1d38ad35d9deb.zip
op-kernel-dev-6ae87fe219ce32ea226254ee72e1d38ad35d9deb.tar.gz
[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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index 9e0c5c3..e90114a 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;
OpenPOWER on IntegriCloud