From cabbcd518fd26e3ad3f94f6a9464cfaae4789253 Mon Sep 17 00:00:00 2001 From: Chao Fu Date: Sun, 28 Sep 2014 16:34:27 +0800 Subject: spi: Remove duplicate code to set default bits_per_word setting The implementation in spi_setup() already set spi->bits_per_word = 8 when spi->bits_per_word is 0 before calling spi->master->setup. So we don't need to do it again in setup() callback. Signed-off-by: Axel Lin Acked-by: Marek Vasut Acked-by: Barry Song Acked-by: Guenter Roeck Signed-off-by: Mark Brown (cherry picked from commit 23061f1eb844edd349c3a0f5f40e244c9d2abfde) Change-Id: I842867bbb99dd71bfcf30ac90300c6ca23c384b9 Reviewed-on: http://git.am.freescale.net:8181/20085 Tested-by: Review Code-CDREVIEW Reviewed-by: Zhengxiong Jin diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index bd0c658..a253920 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -375,9 +375,6 @@ static int dspi_setup(struct spi_device *spi) if (!spi->max_speed_hz) return -EINVAL; - if (!spi->bits_per_word) - spi->bits_per_word = 8; - return dspi_setup_transfer(spi, NULL); } -- cgit v0.10.2