Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 May 2016 18:52:27 +0000 (UTC)
From:      Luiz Otavio O Souza <loos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300769 - head/sys/arm/ti
Message-ID:  <201605261852.u4QIqRGn073897@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: loos
Date: Thu May 26 18:52:26 2016
New Revision: 300769
URL: https://svnweb.freebsd.org/changeset/base/300769

Log:
  Only do the touch screen setup when the 'ti,wires' property is present.
  
  While here fix a typo in a debug message.

Modified:
  head/sys/arm/ti/ti_adc.c

Modified: head/sys/arm/ti/ti_adc.c
==============================================================================
--- head/sys/arm/ti/ti_adc.c	Thu May 26 18:50:57 2016	(r300768)
+++ head/sys/arm/ti/ti_adc.c	Thu May 26 18:52:26 2016	(r300769)
@@ -732,7 +732,7 @@ ti_adc_attach(device_t dev)
 	sc->sc_charge_delay = DEFAULT_CHARGE_DELAY;
 	/* Read "tsc" node properties */
 	child = ofw_bus_find_child(node, "tsc");
-	if (child != 0) {
+	if (child != 0 && OF_hasprop(child, "ti,wires")) {
 		if ((OF_getprop(child, "ti,wires", &cell, sizeof(cell))) > 0)
 			sc->sc_tsc_wires = fdt32_to_cpu(cell);
 		if ((OF_getprop(child, "ti,coordinate-readouts", &cell, sizeof(cell))) > 0)
@@ -745,7 +745,7 @@ ti_adc_attach(device_t dev)
 		    sizeof(*wire_configs), (void **)&wire_configs);
 		if (nwire_configs != sc->sc_tsc_wires) {
 			device_printf(sc->sc_dev,
-			    "invalid nubmer of ti,wire-config: %d (should be %d)\n",
+			    "invalid number of ti,wire-config: %d (should be %d)\n",
 			    nwire_configs, sc->sc_tsc_wires);
 			OF_prop_free(wire_configs);
 			return (EINVAL);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605261852.u4QIqRGn073897>