Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev fix module build
details: https://anonhg.NetBSD.org/src/rev/925e62b36bc1
branches: trunk
changeset: 349378:925e62b36bc1
user: christos <christos%NetBSD.org@localhost>
date: Fri Dec 09 05:17:03 2016 +0000
description:
fix module build
XXX: spkr module is the pcppi version.
diffstat:
sys/dev/isa/spkr_pcppi.c | 8 ++------
sys/dev/spkr.c | 15 ++++++++++-----
sys/dev/spkr_synth.c | 9 ++-------
3 files changed, 14 insertions(+), 18 deletions(-)
diffs (109 lines):
diff -r ed0143a303d5 -r 925e62b36bc1 sys/dev/isa/spkr_pcppi.c
--- a/sys/dev/isa/spkr_pcppi.c Fri Dec 09 04:46:39 2016 +0000
+++ b/sys/dev/isa/spkr_pcppi.c Fri Dec 09 05:17:03 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spkr_pcppi.c,v 1.3 2016/12/09 04:46:39 christos Exp $ */
+/* $NetBSD: spkr_pcppi.c,v 1.4 2016/12/09 05:17:03 christos Exp $ */
/*
* Copyright (c) 1990 Eric S. Raymond (esr%snark.thyrsus.com@localhost)
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spkr_pcppi.c,v 1.3 2016/12/09 04:46:39 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spkr_pcppi.c,v 1.4 2016/12/09 05:17:03 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -78,10 +78,6 @@
return spkr__modcmd(cmd, arg);
}
-#ifdef _MODULE
-#include "ioconf.c"
-#endif
-
CFATTACH_DECL_NEW(spkr_pcppi, 0, spkr_probe, spkrattach, spkrdetach, NULL);
static pcppi_tag_t ppicookie;
diff -r ed0143a303d5 -r 925e62b36bc1 sys/dev/spkr.c
--- a/sys/dev/spkr.c Fri Dec 09 04:46:39 2016 +0000
+++ b/sys/dev/spkr.c Fri Dec 09 05:17:03 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spkr.c,v 1.2 2016/12/09 04:46:39 christos Exp $ */
+/* $NetBSD: spkr.c,v 1.3 2016/12/09 05:17:03 christos Exp $ */
/*
* Copyright (c) 1990 Eric S. Raymond (esr%snark.thyrsus.com@localhost)
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.2 2016/12/09 04:46:39 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.3 2016/12/09 05:17:03 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -478,15 +478,18 @@
return(0);
}
+#ifdef _MODULE
+extern struct cfdriver spkr_cd;
+#include "ioconf.c"
+#endif
+
int
spkr__modcmd(modcmd_t cmd, void *arg)
{
#ifdef _MODULE
devmajor_t bmajor, cmajor;
-#endif
int error = 0;
-#ifdef _MODULE
switch(cmd) {
case MODULE_CMD_INIT:
bmajor = cmajor = -1;
@@ -513,7 +516,9 @@
error = ENOTTY;
break;
}
-#endif
return error;
+#else
+ return 0;
+#endif
}
diff -r ed0143a303d5 -r 925e62b36bc1 sys/dev/spkr_synth.c
--- a/sys/dev/spkr_synth.c Fri Dec 09 04:46:39 2016 +0000
+++ b/sys/dev/spkr_synth.c Fri Dec 09 05:17:03 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spkr_synth.c,v 1.2 2016/12/09 04:32:39 christos Exp $ */
+/* $NetBSD: spkr_synth.c,v 1.3 2016/12/09 05:17:03 christos Exp $ */
/*-
* Copyright (c) 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spkr_synth.c,v 1.2 2016/12/09 04:32:39 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spkr_synth.c,v 1.3 2016/12/09 05:17:03 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -77,11 +77,6 @@
return spkr__modcmd(cmd, arg);
}
-#ifdef _MODULE
-#include "ioconf.c"
-#endif
-
-
CFATTACH_DECL3_NEW(spkr_synth, 0,
spkr_probe, spkrattach, spkrdetach, NULL, NULL, NULL, DVF_DETACH_SHUTDOWN);
Home |
Main Index |
Thread Index |
Old Index