diff options
-rw-r--r-- | drivers/i2c/busses/i2c-viapro.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c index 3be476cd4bc5..a89a21264d37 100644 --- a/drivers/i2c/busses/i2c-viapro.c +++ b/drivers/i2c/busses/i2c-viapro.c | |||
@@ -105,7 +105,7 @@ static struct i2c_adapter vt596_adapter; | |||
105 | static unsigned int vt596_features; | 105 | static unsigned int vt596_features; |
106 | 106 | ||
107 | /* Return -1 on error, 0 on success */ | 107 | /* Return -1 on error, 0 on success */ |
108 | static int vt596_transaction(void) | 108 | static int vt596_transaction(u8 size) |
109 | { | 109 | { |
110 | int temp; | 110 | int temp; |
111 | int result = 0; | 111 | int result = 0; |
@@ -131,7 +131,7 @@ static int vt596_transaction(void) | |||
131 | } | 131 | } |
132 | 132 | ||
133 | /* Start the transaction by setting bit 6 */ | 133 | /* Start the transaction by setting bit 6 */ |
134 | outb_p(inb(SMBHSTCNT) | 0x40, SMBHSTCNT); | 134 | outb_p(0x40 | (size & 0x3C), SMBHSTCNT); |
135 | 135 | ||
136 | /* We will always wait for a fraction of a second */ | 136 | /* We will always wait for a fraction of a second */ |
137 | do { | 137 | do { |
@@ -232,9 +232,8 @@ static s32 vt596_access(struct i2c_adapter *adap, u16 addr, | |||
232 | } | 232 | } |
233 | 233 | ||
234 | outb_p(((addr & 0x7f) << 1) | read_write, SMBHSTADD); | 234 | outb_p(((addr & 0x7f) << 1) | read_write, SMBHSTADD); |
235 | outb_p((size & 0x3C), SMBHSTCNT); | ||
236 | 235 | ||
237 | if (vt596_transaction()) /* Error in transaction */ | 236 | if (vt596_transaction(size)) /* Error in transaction */ |
238 | return -1; | 237 | return -1; |
239 | 238 | ||
240 | if ((read_write == I2C_SMBUS_WRITE) || (size == VT596_QUICK)) | 239 | if ((read_write == I2C_SMBUS_WRITE) || (size == VT596_QUICK)) |