diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-19 23:29:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-19 23:29:34 -0500 |
commit | a8a8a669ea13d792296737505adc43ccacf3a648 (patch) | |
tree | c1a2bbb7bde9ff745651c25b810d6da4c5917b42 | |
parent | 931ed94430e36b9bea3904572424116092ba5663 (diff) | |
parent | a7d73d8c686d919cc18dec63e5e194f0e5a7206e (diff) |
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
-rw-r--r-- | drivers/i2c/busses/i2c-pnx.c | 5 | ||||
-rw-r--r-- | include/linux/i2c-pnx.h | 2 |
2 files changed, 6 insertions, 1 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 @@ | |||
19 | #include <linux/completion.h> | 19 | #include <linux/completion.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/i2c-pnx.h> | 21 | #include <linux/i2c-pnx.h> |
22 | #include <linux/io.h> | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <mach/i2c.h> | ||
23 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
24 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
25 | 27 | ||
@@ -54,6 +56,9 @@ static inline void i2c_pnx_arm_timer(struct i2c_adapter *adap) | |||
54 | struct timer_list *timer = &data->mif.timer; | 56 | struct timer_list *timer = &data->mif.timer; |
55 | int expires = I2C_PNX_TIMEOUT / (1000 / HZ); | 57 | int expires = I2C_PNX_TIMEOUT / (1000 / HZ); |
56 | 58 | ||
59 | if (expires <= 1) | ||
60 | expires = 2; | ||
61 | |||
57 | del_timer_sync(timer); | 62 | del_timer_sync(timer); |
58 | 63 | ||
59 | dev_dbg(&adap->dev, "Timer armed at %lu plus %u jiffies.\n", | 64 | dev_dbg(&adap->dev, "Timer armed at %lu plus %u jiffies.\n", |
diff --git a/include/linux/i2c-pnx.h b/include/linux/i2c-pnx.h index f13255e06406..9eb07bbc6522 100644 --- a/include/linux/i2c-pnx.h +++ b/include/linux/i2c-pnx.h | |||
@@ -21,7 +21,7 @@ struct i2c_pnx_mif { | |||
21 | int mode; /* Interface mode */ | 21 | int mode; /* Interface mode */ |
22 | struct completion complete; /* I/O completion */ | 22 | struct completion complete; /* I/O completion */ |
23 | struct timer_list timer; /* Timeout */ | 23 | struct timer_list timer; /* Timeout */ |
24 | char * buf; /* Data buffer */ | 24 | u8 * buf; /* Data buffer */ |
25 | int len; /* Length of data buffer */ | 25 | int len; /* Length of data buffer */ |
26 | }; | 26 | }; |
27 | 27 | ||