wsmoused() called if cmd == WSDISPLAYIO_WSMOUSED only,
don't need check cmd twice
Comment ? OK ?
note: diff cteated with 'cvs diff -w' for simplicity
--
Alexandr Shadchin
Index: wsdisplay.c
===================================================================
RCS file: /cvs/src/sys/dev/wscons/wsdisplay.c,v
retrieving revision 1.117
diff -u -p -w -r1.117 wsdisplay.c
--- wsdisplay.c 4 Nov 2013 05:45:04 -0000 1.117
+++ wsdisplay.c 14 May 2014 12:34:06 -0000
@@ -1319,7 +1319,7 @@ wsdisplay_cfg_ioctl(struct wsdisplay_sof
switch (cmd) {
#ifdef HAVE_WSMOUSED_SUPPORT
case WSDISPLAYIO_WSMOUSED:
- error = wsmoused(sc, cmd, data, flag, p);
+ error = wsmoused(sc, data, flag, p);
return (error);
#endif
case WSDISPLAYIO_ADDSCREEN:
@@ -2381,12 +2381,10 @@ wsdisplay_burner(void *v)
* Main function, called from wsdisplay_cfg_ioctl.
*/
int
-wsmoused(struct wsdisplay_softc *sc, u_long cmd, caddr_t data,
- int flag, struct proc *p)
+wsmoused(struct wsdisplay_softc *sc, caddr_t data, int flag, struct proc *p)
{
struct wscons_event mouse_event = *(struct wscons_event *)data;
- if (cmd == WSDISPLAYIO_WSMOUSED) {
if (IS_MOTION_EVENT(mouse_event.type)) {
if (sc->sc_focus != NULL)
motion_event(sc->sc_focus, mouse_event.type,
@@ -2410,7 +2408,6 @@ wsmoused(struct wsdisplay_softc *sc, u_l
if (IS_CTRL_EVENT(mouse_event.type)) {
return ctrl_event(sc, mouse_event.type,
mouse_event.value, p);
- }
}
return -1;
}
Index: wsmoused.h
===================================================================
RCS file: /cvs/src/sys/dev/wscons/wsmoused.h,v
retrieving revision 1.8
diff -u -p -w -r1.8 wsmoused.h
--- wsmoused.h 31 May 2009 17:02:20 -0000 1.8
+++ wsmoused.h 14 May 2014 12:34:06 -0000
@@ -35,7 +35,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-int wsmoused(struct wsdisplay_softc *, u_long, caddr_t, int, struct proc *);
+int wsmoused(struct wsdisplay_softc *, caddr_t, int, struct proc *);
void motion_event(struct wsscreen *, u_int, int);
void button_event(struct wsscreen *, int, int);