Module Name:    src
Committed By:   matt
Date:           Tue Jul 26 03:37:57 UTC 2011

Modified Files:
        src/sys/dev/i2c [matt-nb5-pq3]: motoi2c.c

Log Message:
cleanup DEBUG printf


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/dev/i2c/motoi2c.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/i2c/motoi2c.c
diff -u src/sys/dev/i2c/motoi2c.c:1.2.2.2 src/sys/dev/i2c/motoi2c.c:1.2.2.3
--- src/sys/dev/i2c/motoi2c.c:1.2.2.2	Fri Jan  7 01:19:15 2011
+++ src/sys/dev/i2c/motoi2c.c	Tue Jul 26 03:37:57 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: motoi2c.c,v 1.2.2.2 2011/01/07 01:19:15 matt Exp $ */
+/* $NetBSD: motoi2c.c,v 1.2.2.3 2011/07/26 03:37:57 matt Exp $ */
 
 /*-
  * Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: motoi2c.c,v 1.2.2.2 2011/01/07 01:19:15 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motoi2c.c,v 1.2.2.3 2011/07/26 03:37:57 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -47,7 +47,7 @@
 static int motoi2c_debug = 0;
 #define	DPRINTF		if (motoi2c_debug) printf
 #else
-#define	DPRINTF		(void)
+#define	DPRINTF		if (0) printf
 #endif
 
 static int  motoi2c_acquire_bus(void *, int);
@@ -149,8 +149,10 @@
 		DELAY(10);
 
 	if (timo == 0) {
+#ifdef DEBUG
 		DPRINTF("%s: timeout (sr=%#x, cr=%#x)\n",
 		    __func__, sr, I2C_READ(I2CCR));
+#endif
 		error = ETIMEDOUT;
 	}
 	/*

Reply via email to