| From debd2e0bd920027d3bb19d25d41d9df04c2377da Mon Sep 17 00:00:00 2001 |
| From: Mark Brown <broonie@linaro.org> |
| Date: Fri, 9 Aug 2013 17:26:37 +0100 |
| Subject: 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> |
| (cherry picked from commit 30af9b558a56200bda5febd140d5b826581d1f15 |
| Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>) |
| |
| Signed-off-by: Yoshitake Kobayashi <yoshitake.kobayashi@toshiba.co.jp> |
| --- |
| drivers/spi/spi-xilinx.c | 16 ---------------- |
| 1 file changed, 16 deletions(-) |
| |
| diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c |
| index 0f4a093ca8d5..dec7e71a833c 100644 |
| --- a/drivers/spi/spi-xilinx.c |
| +++ b/drivers/spi/spi-xilinx.c |
| @@ -232,21 +232,6 @@ static int xilinx_spi_setup_transfer(struct spi_device *spi, |
| return 0; |
| } |
| |
| -static int xilinx_spi_setup(struct spi_device *spi) |
| -{ |
| - /* always return 0, we can not check the number of bits. |
| - * There are cases when SPI setup is called before any driver is |
| - * there, in that case the SPI core defaults to 8 bits, which we |
| - * do not support in some cases. But if we return an error, the |
| - * SPI device would not be registered and no driver can get hold of it |
| - * When the driver is there, it will call SPI setup again with the |
| - * correct number of bits per transfer. |
| - * If a driver setups with the wrong bit number, it will fail when |
| - * it tries to do a transfer |
| - */ |
| - return 0; |
| -} |
| - |
| static void xilinx_spi_fill_tx_fifo(struct xilinx_spi *xspi) |
| { |
| u8 sr; |
| @@ -391,7 +376,6 @@ static int xilinx_spi_probe(struct platform_device *pdev) |
| xspi->bitbang.chipselect = xilinx_spi_chipselect; |
| xspi->bitbang.setup_transfer = xilinx_spi_setup_transfer; |
| xspi->bitbang.txrx_bufs = xilinx_spi_txrx_bufs; |
| - xspi->bitbang.master->setup = xilinx_spi_setup; |
| init_completion(&xspi->done); |
| |
| res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| -- |
| 1.8.5.rc3 |
| |