aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-sirf.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-01-17 05:53:40 -0500
committerMark Brown <broonie@linaro.org>2014-01-17 10:54:22 -0500
commit23061f1eb844edd349c3a0f5f40e244c9d2abfde (patch)
treee7b8cc5fe643faac2472ddcf0fc14c3ef325be78 /drivers/spi/spi-sirf.c
parent81e53d0470878165a300d75ac06a5bc5eee543a2 (diff)
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>
Diffstat (limited to 'drivers/spi/spi-sirf.c')
-rw-r--r--drivers/spi/spi-sirf.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
index ed5e501c4652..e430689c3837 100644
--- a/drivers/spi/spi-sirf.c
+++ b/drivers/spi/spi-sirf.c
@@ -536,16 +536,9 @@ spi_sirfsoc_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
536 536
537static int spi_sirfsoc_setup(struct spi_device *spi) 537static int spi_sirfsoc_setup(struct spi_device *spi)
538{ 538{
539 struct sirfsoc_spi *sspi;
540
541 if (!spi->max_speed_hz) 539 if (!spi->max_speed_hz)
542 return -EINVAL; 540 return -EINVAL;
543 541
544 sspi = spi_master_get_devdata(spi->master);
545
546 if (!spi->bits_per_word)
547 spi->bits_per_word = 8;
548
549 return spi_sirfsoc_setup_transfer(spi, NULL); 542 return spi_sirfsoc_setup_transfer(spi, NULL);
550} 543}
551 544