summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-03-04 23:02:48 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-03-04 23:02:48 +0000
commit2de758919e28fc4d70bfb8e47f078b153b874024 (patch)
treea48973b23b9c6b6e38b4ecfcbfc82129936f455e /sys
parent09761d2c32c360919ad13f1f0a572d7f15807945 (diff)
do not attach wsdisplay if there is none configured
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/sti.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c
index f7bc9023129..f25a7accf86 100644
--- a/sys/dev/ic/sti.c
+++ b/sys/dev/ic/sti.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sti.c,v 1.11 2002/02/01 18:56:46 mickey Exp $ */
+/* $OpenBSD: sti.c,v 1.12 2002/03/04 23:02:47 mickey Exp $ */
/*
* Copyright (c) 2000-2001 Michael Shalayeff
@@ -37,6 +37,8 @@
* X11 support.
*/
+#include "wsdisplay.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
@@ -125,7 +127,6 @@ sti_attach_common(sc)
{
struct sti_inqconfout cfg;
bus_space_handle_t fbh;
- struct wsemuldisplaydev_attach_args waa;
struct sti_dd *dd;
struct sti_cfg *cc;
struct sti_fontcfg *ff;
@@ -346,14 +347,20 @@ sti_attach_common(sc)
sti_default_screen.fontwidth = ff->width;
sti_default_screen.fontheight = ff->height;
- /* attach WSDISPLAY */
- bzero(&waa, sizeof(waa));
- waa.console = sc->sc_flags & STI_CONSOLE? 1 : 0;
- waa.scrdata = &sti_default_screenlist;
- waa.accessops = &sti_accessops;
- waa.accesscookie = sc;
+#if NWSDISPLAY > 0
+ {
+ struct wsemuldisplaydev_attach_args waa;
+
+ /* attach WSDISPLAY */
+ bzero(&waa, sizeof(waa));
+ waa.console = sc->sc_flags & STI_CONSOLE? 1 : 0;
+ waa.scrdata = &sti_default_screenlist;
+ waa.accessops = &sti_accessops;
+ waa.accesscookie = sc;
- config_found(&sc->sc_dev, &waa, wsemuldisplaydevprint);
+ config_found(&sc->sc_dev, &waa, wsemuldisplaydevprint);
+ }
+#endif
}
int