Module Name:    src
Committed By:   andvar
Date:           Sun Sep 10 20:28:25 UTC 2023

Modified Files:
        src/sys/arch/hpcmips/tx: tx39ir.c

Log Message:
tx39ir(4): rewrite code to use DPRINTF definition from debug.h.
custom one had wrong vrpiu_debug variable in if block (likely copy pasta)
debug code also calls dbg_bitmask_print(), thus was failing to build.
remove unneeded #undef TX39IRDEBUG.

Fixes TX39IRDEBUG build (tested with hpcmips TX3912 kernel config).


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hpcmips/tx/tx39ir.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/arch/hpcmips/tx/tx39ir.c
diff -u src/sys/arch/hpcmips/tx/tx39ir.c:1.10 src/sys/arch/hpcmips/tx/tx39ir.c:1.11
--- src/sys/arch/hpcmips/tx/tx39ir.c:1.10	Sat Oct 27 17:17:54 2012
+++ src/sys/arch/hpcmips/tx/tx39ir.c	Sun Sep 10 20:28:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: tx39ir.c,v 1.10 2012/10/27 17:17:54 chs Exp $ */
+/*	$NetBSD: tx39ir.c,v 1.11 2023/09/10 20:28:25 andvar Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -34,9 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tx39ir.c,v 1.10 2012/10/27 17:17:54 chs Exp $");
-
-#undef TX39IRDEBUG
+__KERNEL_RCSID(0, "$NetBSD: tx39ir.c,v 1.11 2023/09/10 20:28:25 andvar Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -53,11 +51,10 @@ __KERNEL_RCSID(0, "$NetBSD: tx39ir.c,v 1
 #include <hpcmips/tx/tx39clockreg.h> /* XXX */
 
 #ifdef TX39IRDEBUG
-int	tx39ir_debug = 1;
-#define	DPRINTF(arg) if (vrpiu_debug) printf arg;
-#else
-#define	DPRINTF(arg)
+#define DPRINTF_ENABLE
+#define DPRINTF_DEBUG	tx39ir_debug
 #endif
+#include <machine/debug.h>
 
 int	tx39ir_match(device_t, cfdata_t, void *);
 void	tx39ir_attach(device_t, device_t, void *);

Reply via email to