diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-09 12:26:37 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-09 12:32:10 -0400 |
commit | 30af9b558a56200bda5febd140d5b826581d1f15 (patch) | |
tree | 03a62c66afb5cadc4ec35f388cbfa4e3194c0344 /drivers/spi/spi-xilinx.c | |
parent | 52ade736215fb4421a6dc2b6900703a6fadba9e9 (diff) |
spi/bitbang: Drop empty setup() functions
Now that the bitbang core does not require a setup() function we can
drop the check in the altera, nuc900 and xilinx drivers.
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-xilinx.c')
-rw-r--r-- | drivers/spi/spi-xilinx.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c index 09a942852593..fb56fcfdf65e 100644 --- a/drivers/spi/spi-xilinx.c +++ b/drivers/spi/spi-xilinx.c | |||
@@ -233,21 +233,6 @@ static int xilinx_spi_setup_transfer(struct spi_device *spi, | |||
233 | return 0; | 233 | return 0; |
234 | } | 234 | } |
235 | 235 | ||
236 | static int xilinx_spi_setup(struct spi_device *spi) | ||
237 | { | ||
238 | /* always return 0, we can not check the number of bits. | ||
239 | * There are cases when SPI setup is called before any driver is | ||
240 | * there, in that case the SPI core defaults to 8 bits, which we | ||
241 | * do not support in some cases. But if we return an error, the | ||
242 | * SPI device would not be registered and no driver can get hold of it | ||
243 | * When the driver is there, it will call SPI setup again with the | ||
244 | * correct number of bits per transfer. | ||
245 | * If a driver setups with the wrong bit number, it will fail when | ||
246 | * it tries to do a transfer | ||
247 | */ | ||
248 | return 0; | ||
249 | } | ||
250 | |||
251 | static void xilinx_spi_fill_tx_fifo(struct xilinx_spi *xspi) | 236 | static void xilinx_spi_fill_tx_fifo(struct xilinx_spi *xspi) |
252 | { | 237 | { |
253 | u8 sr; | 238 | u8 sr; |
@@ -375,7 +360,6 @@ struct spi_master *xilinx_spi_init(struct device *dev, struct resource *mem, | |||
375 | xspi->bitbang.chipselect = xilinx_spi_chipselect; | 360 | xspi->bitbang.chipselect = xilinx_spi_chipselect; |
376 | xspi->bitbang.setup_transfer = xilinx_spi_setup_transfer; | 361 | xspi->bitbang.setup_transfer = xilinx_spi_setup_transfer; |
377 | xspi->bitbang.txrx_bufs = xilinx_spi_txrx_bufs; | 362 | xspi->bitbang.txrx_bufs = xilinx_spi_txrx_bufs; |
378 | xspi->bitbang.master->setup = xilinx_spi_setup; | ||
379 | init_completion(&xspi->done); | 363 | init_completion(&xspi->done); |
380 | 364 | ||
381 | if (!request_mem_region(mem->start, resource_size(mem), | 365 | if (!request_mem_region(mem->start, resource_size(mem), |