diff options
author | kato <kato@FreeBSD.org> | 1999-05-09 04:37:17 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1999-05-09 04:37:17 +0000 |
commit | d6f0de713ff9a6036553ab76da277d46c40cebf0 (patch) | |
tree | f19dee36919d7832a4425877ef184913266338a9 /sys | |
parent | 870889ecbf3113efafbf4bde18e8c8704c0ff809 (diff) | |
download | FreeBSD-src-d6f0de713ff9a6036553ab76da277d46c40cebf0.zip FreeBSD-src-d6f0de713ff9a6036553ab76da277d46c40cebf0.tar.gz |
Sync with sys/i386/isa/mse.c revision 1.42.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pc98/pc98/mse.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/pc98/pc98/mse.c b/sys/pc98/pc98/mse.c index a71b116..8d89a40 100644 --- a/sys/pc98/pc98/mse.c +++ b/sys/pc98/pc98/mse.c @@ -11,7 +11,7 @@ * this software for any purpose. It is provided "as is" * without express or implied warranty. * - * $Id: mse.c,v 1.18 1998/10/22 05:58:45 bde Exp $ + * $Id: mse.c,v 1.19 1999/04/28 10:53:55 dt Exp $ */ /* * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and @@ -421,8 +421,9 @@ mseread(dev, uio, ioflag) return (0); } sc->sc_flags |= MSESC_WANT; - if (error = tsleep((caddr_t)sc, MSEPRI | PCATCH, - "mseread", 0)) { + error = tsleep((caddr_t)sc, MSEPRI | PCATCH, + "mseread", 0); + if (error) { splx(s); return (error); } @@ -455,7 +456,8 @@ mseread(dev, uio, ioflag) } splx(s); xfer = min(uio->uio_resid, sc->mode.packetsize - sc->sc_bytesread); - if (error = uiomove(&sc->sc_bytes[sc->sc_bytesread], xfer, uio)) + error = uiomove(&sc->sc_bytes[sc->sc_bytesread], xfer, uio); + if (error) return (error); sc->sc_bytesread += xfer; return(0); @@ -592,7 +594,7 @@ msepoll(dev, events, p) int revents = 0; s = spltty(); - if (events & (POLLIN | POLLRDNORM)) + if (events & (POLLIN | POLLRDNORM)) { if (sc->sc_bytesread != sc->mode.packetsize || sc->sc_deltax != 0 || sc->sc_deltay != 0 || (sc->sc_obuttons ^ sc->sc_buttons) != 0) @@ -604,7 +606,7 @@ msepoll(dev, events, p) */ selrecord(p, &sc->sc_selp); } - + } splx(s); return (revents); } |