Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pckbport comment was likely true in 2007 but no long...



details:   https://anonhg.NetBSD.org/src/rev/6b911e29e8fe
branches:  trunk
changeset: 940034:6b911e29e8fe
user:      nia <nia%NetBSD.org@localhost>
date:      Thu Oct 01 14:33:26 2020 +0000

description:
comment was likely true in 2007 but no longer reflects the reality of hw

diffstat:

 sys/dev/pckbport/synaptics.c |  18 +++++-------------
 1 files changed, 5 insertions(+), 13 deletions(-)

diffs (42 lines):

diff -r 25e35e22e329 -r 6b911e29e8fe sys/dev/pckbport/synaptics.c
--- a/sys/dev/pckbport/synaptics.c      Thu Oct 01 13:49:18 2020 +0000
+++ b/sys/dev/pckbport/synaptics.c      Thu Oct 01 14:33:26 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: synaptics.c,v 1.67 2020/05/14 18:06:58 nia Exp $       */
+/*     $NetBSD: synaptics.c,v 1.68 2020/10/01 14:33:26 nia Exp $       */
 
 /*
  * Copyright (c) 2005, Steve C. Woodford
@@ -48,7 +48,7 @@
 #include "opt_pms.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.67 2020/05/14 18:06:58 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.68 2020/10/01 14:33:26 nia Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1683,20 +1683,12 @@
        if (synaptics_up_down_emul == 2) {
                if (sc->up_down == 0) {
                        if (sp->sp_up && sp->sp_down) {
-                               /*
-                                * Most up/down buttons will be actuated using
-                                * a rocker switch, so we should never see
-                                * them both simultaneously. But just in case,
-                                * treat this situation as a middle button
-                                * event.
-                                */
                                sp->sp_middle = 1;
-                       } else
-                       if (sp->sp_up)
+                       } else if (sp->sp_up) {
                                dz = -synaptics_up_down_motion_delta;
-                       else
-                       if (sp->sp_down)
+                       } else if (sp->sp_down) {
                                dz = synaptics_up_down_motion_delta;
+                       }
                }
 
                sc->up_down = sp->sp_up | sp->sp_down;



Home | Main Index | Thread Index | Old Index