diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-20 05:29:34 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-20 05:29:34 +0100 |
commit | a8a8a669ea13d792296737505adc43ccacf3a648 (patch) | |
tree | c1a2bbb7bde9ff745651c25b810d6da4c5917b42 /drivers/i2c | |
parent | Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
parent | i2c: i2c-pnx: Added missing mach/i2c.h and linux/io.h header file includes (diff) | |
download | linux-a8a8a669ea13d792296737505adc43ccacf3a648.tar.xz linux-a8a8a669ea13d792296737505adc43ccacf3a648.zip |
Merge branch 'i2c-pnx-fixes' of git://git.fluff.org/bjdooks/linux
* 'i2c-pnx-fixes' of git://git.fluff.org/bjdooks/linux:
i2c: i2c-pnx: Added missing mach/i2c.h and linux/io.h header file includes
i2c: i2c-pnx: Made buf type unsigned to prevent sign extension
i2c: i2c-pnx: Limit minimum jiffie timeout to 2
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-pnx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c index 6ff6c20f1e78..1fca59077949 100644 --- a/drivers/i2c/busses/i2c-pnx.c +++ b/drivers/i2c/busses/i2c-pnx.c @@ -19,7 +19,9 @@ #include <linux/completion.h> #include <linux/platform_device.h> #include <linux/i2c-pnx.h> +#include <linux/io.h> #include <mach/hardware.h> +#include <mach/i2c.h> #include <asm/irq.h> #include <asm/uaccess.h> @@ -54,6 +56,9 @@ static inline void i2c_pnx_arm_timer(struct i2c_adapter *adap) struct timer_list *timer = &data->mif.timer; int expires = I2C_PNX_TIMEOUT / (1000 / HZ); + if (expires <= 1) + expires = 2; + del_timer_sync(timer); dev_dbg(&adap->dev, "Timer armed at %lu plus %u jiffies.\n", |