summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-11-30 03:00:13 (GMT)
committerJagan Teki <jagan@amarulasolutions.com>2016-12-15 15:38:30 (GMT)
commit1b7c28f5147144d7902d048ca90be58987899c25 (patch)
tree3aea2c3fb0459349b33d04a5daaf950d68210d0d /drivers/spi
parentf06e1588fbd18a03ad0ed0c1b3f82ab4e9d9a6c9 (diff)
downloadu-boot-fsl-qoriq-1b7c28f5147144d7902d048ca90be58987899c25.tar.xz
spi: Add error checking for invalid bus widths
At present an invalid bus width prints a message but does not return an error. This is the opposite of the correct behaviour. Adjust it to avoid code bloat in the common case, and avoid hard-to-debug failure in the uncommon case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@openedev.com>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-uclass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index f59a701..1ab5b75 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -418,7 +418,7 @@ int spi_slave_ofdata_to_platdata(const void *blob, int node,
mode |= SPI_TX_QUAD;
break;
default:
- error("spi-tx-bus-width %d not supported\n", value);
+ warn_non_spl("spi-tx-bus-width %d not supported\n", value);
break;
}
@@ -433,7 +433,7 @@ int spi_slave_ofdata_to_platdata(const void *blob, int node,
mode |= SPI_RX_QUAD;
break;
default:
- error("spi-rx-bus-width %d not supported\n", value);
+ warn_non_spl("spi-rx-bus-width %d not supported\n", value);
break;
}