diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-01-17 05:53:40 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-01-17 10:54:22 -0500 |
commit | 23061f1eb844edd349c3a0f5f40e244c9d2abfde (patch) | |
tree | e7b8cc5fe643faac2472ddcf0fc14c3ef325be78 /drivers/spi/spi-mxs.c | |
parent | 81e53d0470878165a300d75ac06a5bc5eee543a2 (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-mxs.c')
-rw-r--r-- | drivers/spi/spi-mxs.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index 3adebfa22e3d..79e5aa2250c8 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c | |||
@@ -111,14 +111,6 @@ static int mxs_spi_setup_transfer(struct spi_device *dev, | |||
111 | return 0; | 111 | return 0; |
112 | } | 112 | } |
113 | 113 | ||
114 | static int mxs_spi_setup(struct spi_device *dev) | ||
115 | { | ||
116 | if (!dev->bits_per_word) | ||
117 | dev->bits_per_word = 8; | ||
118 | |||
119 | return 0; | ||
120 | } | ||
121 | |||
122 | static u32 mxs_spi_cs_to_reg(unsigned cs) | 114 | static u32 mxs_spi_cs_to_reg(unsigned cs) |
123 | { | 115 | { |
124 | u32 select = 0; | 116 | u32 select = 0; |
@@ -502,7 +494,6 @@ static int mxs_spi_probe(struct platform_device *pdev) | |||
502 | return -ENOMEM; | 494 | return -ENOMEM; |
503 | 495 | ||
504 | master->transfer_one_message = mxs_spi_transfer_one; | 496 | master->transfer_one_message = mxs_spi_transfer_one; |
505 | master->setup = mxs_spi_setup; | ||
506 | master->bits_per_word_mask = SPI_BPW_MASK(8); | 497 | master->bits_per_word_mask = SPI_BPW_MASK(8); |
507 | master->mode_bits = SPI_CPOL | SPI_CPHA; | 498 | master->mode_bits = SPI_CPOL | SPI_CPHA; |
508 | master->num_chipselect = 3; | 499 | master->num_chipselect = 3; |