aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-viapro.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-viapro.c')
-rw-r--r--drivers/i2c/busses/i2c-viapro.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c
index c1c9eb1d714f..566342d50c5f 100644
--- a/drivers/i2c/busses/i2c-viapro.c
+++ b/drivers/i2c/busses/i2c-viapro.c
@@ -126,6 +126,8 @@ static void vt596_dump_regs(const char *msg, u8 size)
126 printk("%02x\n", inb_p(SMBBLKDAT)); 126 printk("%02x\n", inb_p(SMBBLKDAT));
127 } 127 }
128} 128}
129#else
130static inline void vt596_dump_regs(const char *msg, u8 size) { }
129#endif 131#endif
130 132
131/* Return -1 on error, 0 on success */ 133/* Return -1 on error, 0 on success */
@@ -135,9 +137,7 @@ static int vt596_transaction(u8 size)
135 int result = 0; 137 int result = 0;
136 int timeout = 0; 138 int timeout = 0;
137 139
138#ifdef DEBUG
139 vt596_dump_regs("Transaction (pre)", size); 140 vt596_dump_regs("Transaction (pre)", size);
140#endif
141 141
142 /* Make sure the SMBus host is ready to start transmitting */ 142 /* Make sure the SMBus host is ready to start transmitting */
143 if ((temp = inb_p(SMBHSTSTS)) & 0x1F) { 143 if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
@@ -192,9 +192,7 @@ static int vt596_transaction(u8 size)
192 if (temp & 0x1F) 192 if (temp & 0x1F)
193 outb_p(temp, SMBHSTSTS); 193 outb_p(temp, SMBHSTSTS);
194 194
195#ifdef DEBUG
196 vt596_dump_regs("Transaction (post)", size); 195 vt596_dump_regs("Transaction (post)", size);
197#endif
198 196
199 return result; 197 return result;
200} 198}