Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Mar 2018 02:08:34 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330437 - head/sys/arm/freescale/imx
Message-ID:  <201803050208.w2528Y6S026302@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Mon Mar  5 02:08:33 2018
New Revision: 330437
URL: https://svnweb.freebsd.org/changeset/base/330437

Log:
  Do not stop the loop that configures gpio chipselect pins on the first
  error, just ignore pins that don't configure and keep setting up the ones
  that do.  (But when bootverbose is on, whine about the errors.)

Modified:
  head/sys/arm/freescale/imx/imx_spi.c

Modified: head/sys/arm/freescale/imx/imx_spi.c
==============================================================================
--- head/sys/arm/freescale/imx/imx_spi.c	Mon Mar  5 01:56:07 2018	(r330436)
+++ head/sys/arm/freescale/imx/imx_spi.c	Mon Mar  5 02:08:33 2018	(r330437)
@@ -541,7 +541,7 @@ spi_attach(device_t dev)
 
 	/* Allocate gpio pins for configured chip selects. */
 	node = ofw_bus_get_node(sc->dev);
-	for (err = 0, idx = 0; err == 0 && idx < nitems(sc->cspins); ++idx) {
+	for (idx = 0; idx < nitems(sc->cspins); ++idx) {
 		err = gpio_pin_get_by_ofw_propidx(sc->dev, node, "cs-gpios",
 		    idx, &sc->cspins[idx]);
 		if (err == 0) {



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