[U-Boot] [PATCH v4 2/5] spi: spi-uclass: Set slave wordlen with SPI_DEFAULT_WORDLEN

Jagan Teki jteki at openedev.com
Mon Feb 22 13:39:17 CET 2016


From: Christophe Ricard <christophe.ricard at gmail.com>

In some case wordlen may not be set. Use SPI_DEFAULT_WORDLEN as default.

Signed-off-by: Christophe Ricard <christophe-h.ricard at st.com>
Reviewed-by: Simon Glass <sjg at chromium.org>
Reviewed-by: Jagan Teki <jteki at openedev.com>
---
 drivers/spi/spi-uclass.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index 677c020..5561f36 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -158,6 +158,7 @@ static int spi_child_pre_probe(struct udevice *dev)
 	slave->max_hz = plat->max_hz;
 	slave->mode = plat->mode;
 	slave->mode_rx = plat->mode_rx;
+	slave->wordlen = SPI_DEFAULT_WORDLEN;
 
 	return 0;
 }
-- 
1.9.1



More information about the U-Boot mailing list