Commit a8a8a669 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 931ed944 a7d73d8c
...@@ -19,7 +19,9 @@ ...@@ -19,7 +19,9 @@
#include <linux/completion.h> #include <linux/completion.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/i2c-pnx.h> #include <linux/i2c-pnx.h>
#include <linux/io.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/i2c.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -54,6 +56,9 @@ static inline void i2c_pnx_arm_timer(struct i2c_adapter *adap) ...@@ -54,6 +56,9 @@ static inline void i2c_pnx_arm_timer(struct i2c_adapter *adap)
struct timer_list *timer = &data->mif.timer; struct timer_list *timer = &data->mif.timer;
int expires = I2C_PNX_TIMEOUT / (1000 / HZ); int expires = I2C_PNX_TIMEOUT / (1000 / HZ);
if (expires <= 1)
expires = 2;
del_timer_sync(timer); del_timer_sync(timer);
dev_dbg(&adap->dev, "Timer armed at %lu plus %u jiffies.\n", dev_dbg(&adap->dev, "Timer armed at %lu plus %u jiffies.\n",
......
...@@ -21,7 +21,7 @@ struct i2c_pnx_mif { ...@@ -21,7 +21,7 @@ struct i2c_pnx_mif {
int mode; /* Interface mode */ int mode; /* Interface mode */
struct completion complete; /* I/O completion */ struct completion complete; /* I/O completion */
struct timer_list timer; /* Timeout */ struct timer_list timer; /* Timeout */
char * buf; /* Data buffer */ u8 * buf; /* Data buffer */
int len; /* Length of data buffer */ int len; /* Length of data buffer */
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment