From 23061f1eb844edd349c3a0f5f40e244c9d2abfde Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 17 Jan 2014 18:53:40 +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 --- drivers/spi/spi-sc18is602.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/spi/spi-sc18is602.c') diff --git a/drivers/spi/spi-sc18is602.c b/drivers/spi/spi-sc18is602.c index c1a01d1ac315..1edffed9e098 100644 --- a/drivers/spi/spi-sc18is602.c +++ b/drivers/spi/spi-sc18is602.c @@ -254,9 +254,6 @@ error: static int sc18is602_setup(struct spi_device *spi) { - if (!spi->bits_per_word) - spi->bits_per_word = 8; - if (spi->mode & ~(SPI_CPHA | SPI_CPOL | SPI_LSB_FIRST)) return -EINVAL; -- cgit v1.2.3