Skip to content

Commit

Permalink
[PATCH] i2c-viapro: Cleanup ifdef usage
Browse files Browse the repository at this point in the history
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(-)
  • Loading branch information
Greg KH authored and Greg Kroah-Hartman committed Oct 28, 2005
1 parent ed5453e commit ca68f11
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/i2c/busses/i2c-viapro.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ static void vt596_dump_regs(const char *msg, u8 size)
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 */
Expand All @@ -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) {
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit ca68f11

Please sign in to comment.