[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(-)
This commit is contained in:
Greg KH 2005-09-22 22:23:32 +02:00 коммит произвёл Greg Kroah-Hartman
Родитель ed5453e54f
Коммит ca68f1193e
1 изменённых файлов: 2 добавлений и 4 удалений

Просмотреть файл

@ -126,6 +126,8 @@ static void vt596_dump_regs(const char *msg, u8 size)
printk("%02x\n", inb_p(SMBBLKDAT)); printk("%02x\n", inb_p(SMBBLKDAT));
} }
} }
#else
static inline void vt596_dump_regs(const char *msg, u8 size) { }
#endif #endif
/* Return -1 on error, 0 on success */ /* Return -1 on error, 0 on success */
@ -135,9 +137,7 @@ static int vt596_transaction(u8 size)
int result = 0; int result = 0;
int timeout = 0; int timeout = 0;
#ifdef DEBUG
vt596_dump_regs("Transaction (pre)", size); vt596_dump_regs("Transaction (pre)", size);
#endif
/* Make sure the SMBus host is ready to start transmitting */ /* Make sure the SMBus host is ready to start transmitting */
if ((temp = inb_p(SMBHSTSTS)) & 0x1F) { if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
@ -192,9 +192,7 @@ static int vt596_transaction(u8 size)
if (temp & 0x1F) if (temp & 0x1F)
outb_p(temp, SMBHSTSTS); outb_p(temp, SMBHSTSTS);
#ifdef DEBUG
vt596_dump_regs("Transaction (post)", size); vt596_dump_regs("Transaction (post)", size);
#endif
return result; return result;
} }