Skip to content

Commit a8a8a66

Browse files
committed
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
2 parents 931ed94 + a7d73d8 commit a8a8a66

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎drivers/i2c/busses/i2c-pnx.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
#include <linux/completion.h>
2020
#include <linux/platform_device.h>
2121
#include <linux/i2c-pnx.h>
22+
#include <linux/io.h>
2223
#include <mach/hardware.h>
24+
#include <mach/i2c.h>
2325
#include <asm/irq.h>
2426
#include <asm/uaccess.h>
2527

@@ -54,6 +56,9 @@ static inline void i2c_pnx_arm_timer(struct i2c_adapter *adap)
5456
struct timer_list *timer = &data->mif.timer;
5557
int expires = I2C_PNX_TIMEOUT / (1000 / HZ);
5658

59+
if (expires <= 1)
60+
expires = 2;
61+
5762
del_timer_sync(timer);
5863

5964
dev_dbg(&adap->dev, "Timer armed at %lu plus %u jiffies.\n",

‎include/linux/i2c-pnx.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct i2c_pnx_mif {
2121
int mode; /* Interface mode */
2222
struct completion complete; /* I/O completion */
2323
struct timer_list timer; /* Timeout */
24-
char * buf; /* Data buffer */
24+
u8 * buf; /* Data buffer */
2525
int len; /* Length of data buffer */
2626
};
2727

0 commit comments

Comments
 (0)