From gregkh@suse.de Fri Sep 23 00:05:24 2005 Date: Thu, 22 Sep 2005 22:23:32 +0200 From: Greg KH To: Jean Delvare Subject: [PATCH] (7/8) i2c-viapro: Cleanup ifdef usage Message-Id: <20050922222332.000eaa7f.khali@linux-fr.org> It's not nice to put #ifdef in the middle of functions. CC: Jean Delvare Signed-off-by: Greg Kroah-Hartman drivers/i2c/busses/i2c-viapro.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- --- gregkh-2.6.orig/drivers/i2c/busses/i2c-viapro.c +++ gregkh-2.6/drivers/i2c/busses/i2c-viapro.c @@ -126,6 +126,8 @@ static void vt596_dump_regs(const char * printk("%02x\n", inb_p(SMBBLKDAT)); } } +#else +static inline void vt596_dump_regs(const char *msg, u8 size) { } #endif /* Return -1 on error, 0 on success */ @@ -135,9 +137,7 @@ static int vt596_transaction(u8 size) int result = 0; int timeout = 0; -#ifdef DEBUG vt596_dump_regs("Transaction (pre)", size); -#endif /* Make sure the SMBus host is ready to start transmitting */ if ((temp = inb_p(SMBHSTSTS)) & 0x1F) { @@ -192,9 +192,7 @@ static int vt596_transaction(u8 size) if (temp & 0x1F) outb_p(temp, SMBHSTSTS); -#ifdef DEBUG vt596_dump_regs("Transaction (post)", size); -#endif return result; }