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 <axel.lin@ingics.com> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Barry Song <Baohua.Song@csr.com> Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
@@ -396,10 +396,6 @@ static int davinci_spi_setup(struct spi_device *spi)
|
||||
dspi = spi_master_get_devdata(spi->master);
|
||||
pdata = &dspi->pdata;
|
||||
|
||||
/* if bits per word length is zero then set it default 8 */
|
||||
if (!spi->bits_per_word)
|
||||
spi->bits_per_word = 8;
|
||||
|
||||
if (!(spi->mode & SPI_NO_CS)) {
|
||||
if ((pdata->chip_sel == NULL) ||
|
||||
(pdata->chip_sel[spi->chip_select] == SPI_INTERN_CS))
|
||||
|
Reference in New Issue
Block a user