Sync with sys/i386/isa/mse.c revision 1.42.
This commit is contained in:
parent
6a177e0469
commit
c459512080
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user