summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2002-03-14 15:42:45 +0000
committerJason Wright <jason@cvs.openbsd.org>2002-03-14 15:42:45 +0000
commit9407d727dd21cbd70a9d0a477901479d408f2007 (patch)
treed001bcc902bd6e7d3bb541b37203885fe045ae73 /sys
parentc50f9338dabd30f9dc89e85db500430732b636e5 (diff)
Conditionalize com at asio correctly
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sbus/asio.c20
-rw-r--r--sys/dev/sbus/files.sbus4
2 files changed, 13 insertions, 11 deletions
diff --git a/sys/dev/sbus/asio.c b/sys/dev/sbus/asio.c
index 78155d3fc96..3b4abb343fa 100644
--- a/sys/dev/sbus/asio.c
+++ b/sys/dev/sbus/asio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asio.c,v 1.3 2002/03/14 01:27:02 millert Exp $ */
+/* $OpenBSD: asio.c,v 1.4 2002/03/14 15:42:44 jason Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -52,7 +52,7 @@
#include <dev/sbus/asioreg.h>
#include <dev/ic/comvar.h>
-#include "com.h"
+#include "asio.h"
#define BAUD_BASE (1843200)
@@ -93,13 +93,6 @@ struct cfdriver asio_cd = {
NULL, "asio", DV_DULL
};
-int com_asio_match(struct device *, void *, void *);
-void com_asio_attach(struct device *, struct device *, void *);
-
-struct cfattach com_asio_ca = {
- sizeof(struct com_softc), com_asio_match, com_asio_attach
-};
-
int
asio_match(parent, match, aux)
struct device *parent;
@@ -192,6 +185,14 @@ asio_print(aux, name)
return (UNCONF);
}
+#if NCOM_ASIO > 0
+int com_asio_match(struct device *, void *, void *);
+void com_asio_attach(struct device *, struct device *, void *);
+
+struct cfattach com_asio_ca = {
+ sizeof(struct com_softc), com_asio_match, com_asio_attach
+};
+
void
asio_intr_enable(dv, en)
struct device *dv;
@@ -240,3 +241,4 @@ com_asio_attach(parent, self, aux)
com_attach_subr(sc);
}
+#endif
diff --git a/sys/dev/sbus/files.sbus b/sys/dev/sbus/files.sbus
index 396b294f6fe..e309fb9e1f5 100644
--- a/sys/dev/sbus/files.sbus
+++ b/sys/dev/sbus/files.sbus
@@ -1,4 +1,4 @@
-# $OpenBSD: files.sbus,v 1.14 2002/03/06 16:09:46 jason Exp $
+# $OpenBSD: files.sbus,v 1.15 2002/03/14 15:42:43 jason Exp $
# $NetBSD: files.sbus,v 1.16 2000/12/08 17:29:12 martin Exp $
#
# Config file and device description for machine-independent SBUS code.
@@ -82,4 +82,4 @@ file dev/sbus/uperf_sbus.c uperf_sbus
device asio {}
attach asio at sbus
attach com at asio with com_asio
-file dev/sbus/asio.c asio | com_asio
+file dev/sbus/asio.c asio | com_asio needs-flag