summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2012-04-28 19:53:18 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2012-04-28 19:53:18 +0000
commit0cb6d8c5ad44453f34ba9434ead3f76256777044 (patch)
treeda0d0ca95143dcce670235307e6c55ea7aa330d1
parent9890779218a69222217e2ee845467e04c073ade2 (diff)
Be sure to initialize the `state' member of the softc when attaching the
console keyboard, otherwise led update commands will never get transmitted. Noticed by sebastia@
-rw-r--r--sys/arch/sgi/hpc/z8530kbd.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/arch/sgi/hpc/z8530kbd.c b/sys/arch/sgi/hpc/z8530kbd.c
index 052553abf2b..5392fa3cc56 100644
--- a/sys/arch/sgi/hpc/z8530kbd.c
+++ b/sys/arch/sgi/hpc/z8530kbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: z8530kbd.c,v 1.2 2012/04/27 19:22:06 miod Exp $ */
+/* $OpenBSD: z8530kbd.c,v 1.3 2012/04/28 19:53:17 miod Exp $ */
/* $NetBSD: zs_kbd.c,v 1.8 2008/03/29 19:15:35 tsutsui Exp $ */
/*
@@ -179,7 +179,6 @@ const struct wskbd_consops zskbd_wskbd_consops = {
zskbd_wskbd_bell
};
-struct zskbd_devconfig zskbd_console_dc;
int zskbd_is_console = 0;
int
@@ -211,14 +210,11 @@ zskbd_attach(struct device *parent, struct device *self, void *aux)
cs->cs_ops = &zskbd_zsops;
cs->cs_private = sc;
- if (zskbd_is_console) {
- sc->sc_dc = &zskbd_console_dc;
+ sc->sc_dc = malloc(sizeof(struct zskbd_devconfig), M_DEVBUF,
+ M_WAITOK | M_ZERO);
+ sc->sc_dc->state = TX_READY;
+ if (zskbd_is_console)
sc->sc_dc->enabled = 1;
- } else {
- sc->sc_dc = malloc(sizeof(struct zskbd_devconfig), M_DEVBUF,
- M_WAITOK | M_ZERO);
- sc->sc_dc->state = TX_READY;
- }
printf("\n");