WF200 chip works with 16-bit words over SPI, so use that word size if available. This avoids a bounce buffer usage for little-endian hosts. Signed-off-by: Michał Mirosław <mirq-linux@xxxxxxxxxxxx> --- drivers/staging/wfx/bus_spi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index 2b108a9fa5ae..c5f78161234d 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -175,9 +175,12 @@ static int wfx_spi_probe(struct spi_device *func) struct wfx_spi_priv *bus; int ret; - if (!func->bits_per_word) - func->bits_per_word = 16; + func->bits_per_word = 16; ret = spi_setup(func); + if (ret == -EINVAL) { + func->bits_per_word = 8; + ret = spi_setup(func); + } if (ret) return ret; // Trace below is also displayed by spi_setup() if compiled with DEBUG -- 2.20.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel