[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

yds.c fails to compile with AUDIO_DEBUG defined



While working to see what it will take to get the yds driver to work with
power suspend/resume I noticed that the file src/sys/dev/pci/yds.c failes
to compile with AUDIO_DEBUG enabled.

I am supplying a patch that works for me to make yds.c compile with "option
AUDIO_DEBUG" (and the resulting GENERIC kernel works just fine too).
Please test and commit this patch if possible.  Also, please let me know if
I have anything wrong, extraneous, or what could could be better (KNF,
updated methods, etc).

Thanks

-dan

##====================================================================

--- yds.c.orig	Thu Dec  6 22:21:09 2001
+++ yds.c	Thu Dec  6 22:34:51 2001
@@ -69,6 +69,11 @@
 #include <dev/pci/ydsreg.h>
 #include <dev/pci/ydsvar.h>
 
+#ifdef AUDIO_DEBUG
+#include <uvm/uvm_extern.h>              /* for vtophys */
+#include <uvm/uvm_pmap.h>            /* for vtophys */
+#endif
+
 /* Debug */
 #undef YDS_USE_REC_SLOT
 #define YDS_USE_P44
@@ -77,6 +82,9 @@
 # define DPRINTF(x)	if (ydsdebug) printf x
 # define DPRINTFN(n,x)	if (ydsdebug>(n)) printf x
 int	ydsdebug = 0;
+#ifndef __NetBSD__
+#define bitmask_snprintf(q,f,b,l) snprintf((b), (l), "%b", (q), (f))
+#endif
 #else
 # define DPRINTF(x)
 # define DPRINTFN(n,x)