summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorjmcneill <jmcneill@NetBSD.org>2019-01-30 10:54:52 +0000
committerjmcneill <jmcneill@NetBSD.org>2019-01-30 10:54:52 +0000
commitd68fca8af5dffefc458887edf2f33fe8c4d3eb9d (patch)
tree2c6a9477fce39a0b9ba2228e1967ee44a5fe5a0c /sys
parente38c0226abf1e66ace63bd5a5bf8f3765ee11d10 (diff)
Revert previous as it does not completely solve the problem of detaching a wsdisplay device
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/wscons/wsdisplay.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index 72470959cf9..5af5a05a7c4 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay.c,v 1.150 2019/01/30 02:43:47 jmcneill Exp $ */
+/* $NetBSD: wsdisplay.c,v 1.151 2019/01/30 10:54:52 jmcneill Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.150 2019/01/30 02:43:47 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.151 2019/01/30 10:54:52 jmcneill Exp $");
#ifdef _KERNEL_OPT
#include "opt_wsdisplay_compat.h"
@@ -966,12 +966,10 @@ wsdisplay_preattach(const struct wsscreen_descr *type, void *cookie,
void
wsdisplay_cndetach(void)
{
- if (wsdisplay_console_initted > 0) {
- cn_tab = wsdisplay_ocn;
- wsdisplay_console_initted = 0;
- wsdisplay_console_attached = 0;
- wsdisplay_console_device = NULL;
- }
+ KASSERT(wsdisplay_console_initted == 2);
+
+ cn_tab = wsdisplay_ocn;
+ wsdisplay_console_initted = 0;
}
/*