diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-viapro.c')
-rw-r--r-- | drivers/i2c/busses/i2c-viapro.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c index e4b1543015af..d57292e5dae0 100644 --- a/drivers/i2c/busses/i2c-viapro.c +++ b/drivers/i2c/busses/i2c-viapro.c | |||
@@ -165,10 +165,10 @@ static int vt596_transaction(u8 size) | |||
165 | do { | 165 | do { |
166 | msleep(1); | 166 | msleep(1); |
167 | temp = inb_p(SMBHSTSTS); | 167 | temp = inb_p(SMBHSTSTS); |
168 | } while ((temp & 0x01) && (timeout++ < MAX_TIMEOUT)); | 168 | } while ((temp & 0x01) && (++timeout < MAX_TIMEOUT)); |
169 | 169 | ||
170 | /* If the SMBus is still busy, we give up */ | 170 | /* If the SMBus is still busy, we give up */ |
171 | if (timeout >= MAX_TIMEOUT) { | 171 | if (timeout == MAX_TIMEOUT) { |
172 | result = -ETIMEDOUT; | 172 | result = -ETIMEDOUT; |
173 | dev_err(&vt596_adapter.dev, "SMBus timeout!\n"); | 173 | dev_err(&vt596_adapter.dev, "SMBus timeout!\n"); |
174 | } | 174 | } |
@@ -444,7 +444,7 @@ release_region: | |||
444 | return error; | 444 | return error; |
445 | } | 445 | } |
446 | 446 | ||
447 | static struct pci_device_id vt596_ids[] = { | 447 | static const struct pci_device_id vt596_ids[] = { |
448 | { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596_3), | 448 | { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596_3), |
449 | .driver_data = SMBBA1 }, | 449 | .driver_data = SMBBA1 }, |
450 | { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596B_3), | 450 | { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596B_3), |