From owner-svn-src-all@freebsd.org Thu May 26 18:52:28 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E0F7B4B278; Thu, 26 May 2016 18:52:28 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3DF713DE; Thu, 26 May 2016 18:52:27 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4QIqRrL073898; Thu, 26 May 2016 18:52:27 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4QIqRGn073897; Thu, 26 May 2016 18:52:27 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201605261852.u4QIqRGn073897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 26 May 2016 18:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300769 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2016 18:52:28 -0000 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);