Date: Tue, 15 Jul 2014 22:16:47 +0000 (UTC) From: Jakub Wojciech Klama <jceel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r268716 - user/jceel/soc2014_evdev/head/sys/dev/atkbdc Message-ID: <201407152216.s6FMGltL037150@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jceel Date: Tue Jul 15 22:16:46 2014 New Revision: 268716 URL: http://svnweb.freebsd.org/changeset/base/268716 Log: Remove unneeded printf and fix obvious mistake in code. Modified: user/jceel/soc2014_evdev/head/sys/dev/atkbdc/psm.c Modified: user/jceel/soc2014_evdev/head/sys/dev/atkbdc/psm.c ============================================================================== --- user/jceel/soc2014_evdev/head/sys/dev/atkbdc/psm.c Tue Jul 15 21:13:08 2014 (r268715) +++ user/jceel/soc2014_evdev/head/sys/dev/atkbdc/psm.c Tue Jul 15 22:16:46 2014 (r268716) @@ -1113,7 +1113,7 @@ reinitialize(struct psm_softc *sc, int d splx(s); /* restore the driver state */ - if ((sc->state & PSM_OPEN) && (err == 0)) { + if ((sc->state & (PSM_OPEN | PSM_EV_OPEN)) && (err == 0)) { /* enable the aux device and the port again */ err = doopen(sc, c); if (err != 0) @@ -1602,15 +1602,16 @@ static int psm_ev_open(struct evdev_dev *evdev, void *ev_softc) { struct psm_softc *sc = (struct psm_softc *)ev_softc; - - printf("psm_ev_open()\n"); - - sc->state |= PSM_EV_OPEN; + int err; if (sc->state & PSM_OPEN) return (0); - return (psmopen(sc)); + err = psmopen(sc); + if (err == 0) + sc->state |= PSM_EV_OPEN; + + return (err); } static void @@ -3664,7 +3665,7 @@ psmsoftintr(void *arg) } #ifdef EVDEV - if (sc->flags & PSM_EV_OPEN) { + if (sc->state & PSM_EV_OPEN) { if (x != 0 || y != 0) { evdev_push_event(sc->evdev, EV_REL, REL_X, x); evdev_push_event(sc->evdev, EV_REL, REL_Y, y);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407152216.s6FMGltL037150>