Mon Jun 12 07:10:07 2017 UTC ()
Always include declarations/definitions for NWSMUX and NWSDISPLAY even
if they aren't needed.  This enables us to have structures of a fixed
size regardless of which child devices are configured, which enables
better modularization.


(pgoyette)
diff -r1.16 -r1.17 src/sys/dev/wscons/wsmuxvar.h

cvs diff -r1.16 -r1.17 src/sys/dev/wscons/wsmuxvar.h (expand / switch to context diff)
--- src/sys/dev/wscons/wsmuxvar.h 2017/06/11 03:55:56 1.16
+++ src/sys/dev/wscons/wsmuxvar.h 2017/06/12 07:10:07 1.17
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsmuxvar.h,v 1.16 2017/06/11 03:55:56 nat Exp $	*/
+/*	$NetBSD: wsmuxvar.h,v 1.17 2017/06/12 07:10:07 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,13 +37,9 @@
 	const struct wssrcops *me_ops;	/* method pointers */
 	struct wseventvar me_evar;	/* wseventvar opened directly */
 	struct wseventvar *me_evp;	/* our wseventvar when open */
-#if NWSDISPLAY > 0
 	device_t me_dispdv;       /* our display if part of one */
-#endif
-#if NWSMUX > 0
 	struct wsmux_softc *me_parent;	/* parent mux device */
 	TAILQ_ENTRY(wsevsrc) me_next;	/* sibling pointers */
-#endif
 };
 
 /*
@@ -70,7 +66,6 @@
 #define wsevsrc_set_display(me, arg) \
 	((me)->me_ops->dsetdisplay((me)->me_dv, arg))
 
-#if NWSMUX > 0
 struct wsmux_softc {
 	struct wsevsrc sc_base;
 	struct proc *sc_p;		/* open proc */
@@ -90,5 +85,3 @@
 int	wskbd_add_mux(int, struct wsmux_softc *);
 int	wsmouse_add_mux(int, struct wsmux_softc *);
 int	wsbell_add_mux(int, struct wsmux_softc *);
-
-#endif /* NWSMUX > 0 */