aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg KH <greg@kroah.com>2005-09-22 16:23:32 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 17:02:08 -0400
commitca68f1193e8fc86470d4222d563d13b5584dc4f8 (patch)
tree6bfb26f76e4a0986bfed32080d6aa6cec45f1b38 /drivers
parented5453e54f0c4a29605fd8399f58649d8739f5f0 (diff)
[PATCH] i2c-viapro: Cleanup ifdef usage
It's not nice to put #ifdef in the middle of functions. CC: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> drivers/i2c/busses/i2c-viapro.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
Diffstat (limited to 'drivers')
-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}