Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/sunxi Only call wsmouse_input() if we have a ws...



details:   https://anonhg.NetBSD.org/src/rev/bb2080144e05
branches:  trunk
changeset: 451779:bb2080144e05
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Jun 04 03:03:34 2019 +0000

description:
Only call wsmouse_input() if we have a wsmousedev attached (which only
happens if the DT tells us to connect one).

Fixes a panic on my Lamobo R1 (with no connected touchscreen).

diffstat:

 sys/arch/arm/sunxi/sunxi_ts.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r deb35f5c3d06 -r bb2080144e05 sys/arch/arm/sunxi/sunxi_ts.c
--- a/sys/arch/arm/sunxi/sunxi_ts.c     Tue Jun 04 00:08:00 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_ts.c     Tue Jun 04 03:03:34 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_ts.c,v 1.2 2017/10/09 14:28:01 jmcneill Exp $ */
+/* $NetBSD: sunxi_ts.c,v 1.3 2019/06/04 03:03:34 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_ts.c,v 1.2 2017/10/09 14:28:01 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_ts.c,v 1.3 2019/06/04 03:03:34 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -268,7 +268,7 @@
                if (sc->sc_ignoredata) {
                        /* Discard the first report */
                        sc->sc_ignoredata = false;
-               } else {
+               } else if (sc->sc_wsmousedev != NULL) {
                        if (sc->sc_ts_inverted_x)
                                x = __SHIFTOUT_MASK(TP_DATA_MASK) - x;
                        if (sc->sc_ts_inverted_y)



Home | Main Index | Thread Index | Old Index