From b609967aa737a0bc9b64e7a80756f9eabe7fe3f5 Mon Sep 17 00:00:00 2001 From: augustss Date: Sat, 27 Oct 2001 00:35:48 +0000 Subject: [PATCH] Don't enable/disable kbds that belong to a display; they are always enabled. --- sys/dev/wscons/wskbd.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c index 2e5cd0edcf3b..160b6e386c3c 100644 --- a/sys/dev/wscons/wskbd.c +++ b/sys/dev/wscons/wskbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: wskbd.c,v 1.52 2001/10/26 20:48:47 augustss Exp $ */ +/* $NetBSD: wskbd.c,v 1.53 2001/10/27 00:35:48 augustss Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.52 2001/10/26 20:48:47 augustss Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.53 2001/10/27 00:35:48 augustss Exp $"); /* * Copyright (c) 1992, 1993 @@ -676,6 +676,10 @@ wskbd_enable(struct wskbd_softc *sc, int on) )) return (EBUSY); #endif +#if NWSDISPLAY > 0 + if (sc->sc_base.me_dispdv != NULL) + return (0); +#endif error = (*sc->sc_accessops->enable)(sc->sc_accesscookie, on); DPRINTF(("wskbd_enable: sc=%p on=%d res=%d\n", sc, on, error)); @@ -1129,9 +1133,9 @@ wskbd_set_display(struct device *dv, struct wsevsrc *me) } odisplaydv = sc->sc_base.me_dispdv; - sc->sc_base.me_dispdv = displaydv; - + sc->sc_base.me_dispdv = NULL; error = wskbd_enable(sc, displaydv != NULL); + sc->sc_base.me_dispdv = displaydv; if (error) { sc->sc_base.me_dispdv = odisplaydv; return (error);