> From: Ulf Brosziewski <[email protected]>
> Date: Sun, 5 Jun 2016 09:54:55 +0200
> 
> ok?

ok kettenis@

> On 06/01/2016 01:21 AM, Ulf Brosziewski wrote:
> > These diffs adapt various drivers to the new input functions of
> > wsmouse, namely
> >     arch/i386/isa/lms.c,
> >     arch/i386/isa/mms.c,
> >     arch/luna88k/dev/lunaws.c,
> >     arch/sgi/hpc/z8530ms.c,
> >     dev/adb/ams.c,
> >     dev/sun/sunms.c, and
> >     dev/usb/utpms.c.
> > Each of the diffs just replaces wsmouse_input with the WSMOUSE_INPUT
> > macro, which reports inputs with relative coordinates to wsmouse
> > (I will post a second set of diffs for drivers that handle absolute
> > coordinates).
> > 
> > Tests and/or OKs would be welcome.
> > 
> > 
> > Index: arch/i386/isa/lms.c
> > ===================================================================
> > RCS file: /cvs/src/sys/arch/i386/isa/lms.c,v
> > retrieving revision 1.20
> > diff -u -p -r1.20 lms.c
> > --- arch/i386/isa/lms.c     10 Apr 2007 22:37:17 -0000      1.20
> > +++ arch/i386/isa/lms.c     31 May 2016 19:23:09 -0000
> > @@ -235,8 +235,7 @@ lmsintr(void *arg)
> >     sc->oldbuttons = buttons;
> >  
> >     if (dx || dy || changed)
> > -           wsmouse_input(sc->sc_wsmousedev,
> > -                         buttons, dx, dy, 0, 0, WSMOUSE_INPUT_DELTA);
> > +           WSMOUSE_INPUT(sc->sc_wsmousedev, buttons, dx, dy, 0, 0);
> >  
> >     return -1;
> >  }
> > Index: arch/i386/isa/mms.c
> > ===================================================================
> > RCS file: /cvs/src/sys/arch/i386/isa/mms.c,v
> > retrieving revision 1.19
> > diff -u -p -r1.19 mms.c
> > --- arch/i386/isa/mms.c     10 Apr 2007 22:37:17 -0000      1.19
> > +++ arch/i386/isa/mms.c     31 May 2016 19:23:09 -0000
> > @@ -229,8 +229,7 @@ mmsintr(void *arg)
> >     changed = status & 0x38;
> >  
> >     if (dx || dy || changed)
> > -           wsmouse_input(sc->sc_wsmousedev,
> > -                         buttons, dx, dy, 0, 0, WSMOUSE_INPUT_DELTA);
> > +           WSMOUSE_INPUT(sc->sc_wsmousedev, buttons, dx, dy, 0, 0);
> >  
> >     return -1;
> >  }
> > Index: arch/luna88k/dev/lunaws.c
> > ===================================================================
> > RCS file: /cvs/src/sys/arch/luna88k/dev/lunaws.c,v
> > retrieving revision 1.11
> > diff -u -p -r1.11 lunaws.c
> > --- arch/luna88k/dev/lunaws.c       7 Jun 2014 11:55:35 -0000       1.11
> > +++ arch/luna88k/dev/lunaws.c       31 May 2016 19:23:09 -0000
> > @@ -260,9 +260,8 @@ wsintr(int chan)
> >                     else if (sc->sc_msreport == 2) {
> >                             sc->dy = (signed char)code;
> >                             if (sc->sc_wsmousedev != NULL)
> > -                                   wsmouse_input(sc->sc_wsmousedev,
> > -                                       sc->buttons, sc->dx, sc->dy, 0, 0,
> > -                                       WSMOUSE_INPUT_DELTA);
> > +                                   WSMOUSE_INPUT(sc->sc_wsmousedev,
> > +                                       sc->buttons, sc->dx, sc->dy, 0, 0);
> >                             sc->sc_msreport = 0;
> >                     }
> >  #else
> > Index: arch/sgi/hpc/z8530ms.c
> > ===================================================================
> > RCS file: /cvs/src/sys/arch/sgi/hpc/z8530ms.c,v
> > retrieving revision 1.1
> > diff -u -p -r1.1 z8530ms.c
> > --- arch/sgi/hpc/z8530ms.c  17 Apr 2012 22:06:33 -0000      1.1
> > +++ arch/sgi/hpc/z8530ms.c  31 May 2016 19:23:09 -0000
> > @@ -296,7 +296,7 @@ zsms_wsmouse_input(struct zsms_softc *sc
> >     x = (int)sc->packet[ZSMS_PACKET_X1] + (int)sc->packet[ZSMS_PACKET_X2];
> >     y = (int)sc->packet[ZSMS_PACKET_Y1] + (int)sc->packet[ZSMS_PACKET_Y2];
> >  
> > -   wsmouse_input(sc->wsmousedev, btns, x, y, 0, 0, WSMOUSE_INPUT_DELTA);
> > +   WSMOUSE_INPUT(sc->wsmousedev, btns, x, y, 0, 0);
> >  }
> >  
> >  int
> > Index: dev/adb/ams.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/adb/ams.c,v
> > retrieving revision 1.6
> > diff -u -p -r1.6 ams.c
> > --- dev/adb/ams.c   15 Jun 2011 21:32:05 -0000      1.6
> > +++ dev/adb/ams.c   31 May 2016 19:23:10 -0000
> > @@ -501,8 +501,7 @@ ms_processevent(adb_event_t *event, stru
> >         ((event->bytes[0] & 0x40) ? 64 : 0);
> >  
> >     if (sc->sc_wsmousedev)
> > -           wsmouse_input(sc->sc_wsmousedev, buttons, dx, -dy, 0, 0,
> > -               WSMOUSE_INPUT_DELTA);
> > +           WSMOUSE_INPUT(sc->sc_wsmousedev, buttons, dx, -dy, 0, 0);
> >  }
> >  
> >  int
> > Index: dev/sun/sunms.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/sun/sunms.c,v
> > retrieving revision 1.1
> > diff -u -p -r1.1 sunms.c
> > --- dev/sun/sunms.c 20 May 2009 18:22:33 -0000      1.1
> > +++ dev/sun/sunms.c 31 May 2016 19:23:12 -0000
> > @@ -220,8 +220,8 @@ sunms_input(struct sunms_softc *sc, int 
> >     if (sc->sc_byteno == sc->sc_pktlen) {
> >             timeout_del(&sc->sc_abort_tmo);
> >             sc->sc_byteno = -1;
> > -           wsmouse_input(sc->sc_wsmousedev, sc->sc_mb,
> > -               sc->sc_dx, sc->sc_dy, 0, 0, WSMOUSE_INPUT_DELTA);
> > +           WSMOUSE_INPUT(sc->sc_wsmousedev,
> > +               sc->sc_mb, sc->sc_dx, sc->sc_dy, 0, 0);
> >             sc->sc_dx = sc->sc_dy = 0;
> >     }
> >  }
> > Index: dev/usb/utpms.c
> > ===================================================================
> > RCS file: /cvs/src/sys/dev/usb/utpms.c,v
> > retrieving revision 1.6
> > diff -u -p -r1.6 utpms.c
> > --- dev/usb/utpms.c 4 Dec 2015 16:22:27 -0000       1.6
> > +++ dev/usb/utpms.c 31 May 2016 19:23:12 -0000
> > @@ -468,8 +468,7 @@ utpms_intr(struct uhidev *addr, void *ib
> >     if ((dx != 0 || dy != 0 || dz != 0 || buttons != sc->sc_buttons) &&
> >         sc->sc_wsmousedev != NULL) {
> >             s = spltty();
> > -           wsmouse_input(sc->sc_wsmousedev, buttons, dx, -dy, dz, 0,
> > -               WSMOUSE_INPUT_DELTA);
> > +           WSMOUSE_INPUT(sc->sc_wsmousedev, buttons, dx, -dy, dz, 0);
> >             splx(s);
> >     }
> >     sc->sc_buttons = buttons;
> > 
> > 
> 
> 

Reply via email to