svn commit: r300769 - head/sys/arm/ti

Luiz Otavio O Souza loos at FreeBSD.org
Thu May 26 18:52:28 UTC 2016


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);


More information about the svn-src-head mailing list