diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-10-16 11:24:05 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-10-16 11:24:05 +0000 |
commit | 4fce0efc2e02f980be054d392843d4649cc499cc (patch) | |
tree | 19dac4713d591048aadd5d7ed387a4757492153f | |
parent | 345e1f669b4b7bd0c73417360942f57c950c0d8d (diff) |
Remove some duplicated code. No need to flush/reset at attach and then
again at PMS_STATE_CHANGE events.
Tested my myself, ian@ and nicm@ without regressions on usual
problematic machines.
From shadchin.
-rw-r--r-- | sys/dev/pckbc/pms.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/sys/dev/pckbc/pms.c b/sys/dev/pckbc/pms.c index 67913104210..d5c88bc2f0d 100644 --- a/sys/dev/pckbc/pms.c +++ b/sys/dev/pckbc/pms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pms.c,v 1.8 2010/10/07 01:52:25 krw Exp $ */ +/* $OpenBSD: pms.c,v 1.9 2010/10/16 11:24:04 krw Exp $ */ /* $NetBSD: psm.c,v 1.11 2000/06/05 22:20:57 sommerfeld Exp $ */ /*- @@ -167,30 +167,12 @@ pmsattach(parent, self, aux) struct pms_softc *sc = (void *)self; struct pckbc_attach_args *pa = aux; struct wsmousedev_attach_args a; - u_char cmd[1], resp[2]; - int res; sc->sc_kbctag = pa->pa_tag; sc->sc_kbcslot = pa->pa_slot; printf("\n"); - /* Flush any garbage. */ - pckbc_flush(pa->pa_tag, pa->pa_slot); - - /* reset the device */ - cmd[0] = PMS_RESET; - res = pckbc_poll_cmd(pa->pa_tag, pa->pa_slot, cmd, 1, 2, resp, 1); -#ifdef DEBUG - if (res || resp[0] != PMS_RSTDONE || resp[1] != 0) { - printf("pmsattach: reset error\n"); - return; - } -#endif - - sc->inputstate = 0; - sc->oldbuttons = 0; - pckbc_set_inputhandler(sc->sc_kbctag, sc->sc_kbcslot, pmsinput, sc, sc->sc_dev.dv_xname); |