aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-dev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-03-18 23:53:57 -0700
committerDavid S. Miller <davem@davemloft.net>2009-03-18 23:53:57 -0700
commit0702b30dd821ac8a4103ddbe545518713fdca9be (patch)
tree8ce0c9f5e58c5ccb99870505eecd139986caa05e /drivers/i2c/i2c-dev.c
parentsparc64: Fix crash with /proc/iomem (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 (diff)
downloadlinux-dev-0702b30dd821ac8a4103ddbe545518713fdca9be.tar.xz
linux-dev-0702b30dd821ac8a4103ddbe545518713fdca9be.zip
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'drivers/i2c/i2c-dev.c')
-rw-r--r--drivers/i2c/i2c-dev.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index c171988a9f51..7e13d2df9af3 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -35,6 +35,7 @@
#include <linux/i2c.h>
#include <linux/i2c-dev.h>
#include <linux/smp_lock.h>
+#include <linux/jiffies.h>
#include <asm/uaccess.h>
static struct i2c_driver i2cdev_driver;
@@ -422,7 +423,10 @@ static long i2cdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
client->adapter->retries = arg;
break;
case I2C_TIMEOUT:
- client->adapter->timeout = arg;
+ /* For historical reasons, user-space sets the timeout
+ * value in units of 10 ms.
+ */
+ client->adapter->timeout = msecs_to_jiffies(arg * 10);
break;
default:
/* NOTE: returning a fault code here could cause trouble