svn commit: r330437 - head/sys/arm/freescale/imx

Ian Lepore ian at FreeBSD.org
Mon Mar 5 02:08:34 UTC 2018


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


More information about the svn-src-head mailing list