From a3389cb7360af9c0c4ff6486e86cd1c67a92eb66 Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Mon, 5 Mar 2018 02:08:33 +0000 Subject: [PATCH] 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.) --- sys/arm/freescale/imx/imx_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/freescale/imx/imx_spi.c b/sys/arm/freescale/imx/imx_spi.c index a2af7b5f533..b6707db9914 100644 --- a/sys/arm/freescale/imx/imx_spi.c +++ b/sys/arm/freescale/imx/imx_spi.c @@ -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) {