summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-nuc900.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2013-07-10 12:38:18 -0400
committerMark Brown <broonie@linaro.org>2013-07-11 06:35:25 -0400
commit103ccee4ef1595468cf79c93068d253c7f2d85a8 (patch)
treeb7aa936bca89bee352b1b52e5628e55ac89b7931 /drivers/spi/spi-nuc900.c
parented893559c9799df3b32051871c22017151394d82 (diff)
spi: revert master->setup function removal for altera and nuc900
Commit 24778be "spi: convert drivers to use bits_per_word_mask" removed what appeared to be redundant code from many drivers. However, it appears that in the spi-bitbang case, these functions are required by the spi-bitbang core, even if they don't do anything. Restore them. For 3.12, the spi-bitbang core should be adjusted not to require these callbacks to exist if they don't need to do anything. This is the equivalent of Michal Simek's patch "spi/xilinx: Revert master->setup function removal", applied to other affected drivers. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-nuc900.c')
-rw-r--r--drivers/spi/spi-nuc900.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/spi/spi-nuc900.c b/drivers/spi/spi-nuc900.c
index 2ad3d74ac021..150d85453c27 100644
--- a/drivers/spi/spi-nuc900.c
+++ b/drivers/spi/spi-nuc900.c
@@ -174,6 +174,17 @@ static void nuc900_spi_gobusy(struct nuc900_spi *hw)
174 spin_unlock_irqrestore(&hw->lock, flags); 174 spin_unlock_irqrestore(&hw->lock, flags);
175} 175}
176 176
177static int nuc900_spi_setupxfer(struct spi_device *spi,
178 struct spi_transfer *t)
179{
180 return 0;
181}
182
183static int nuc900_spi_setup(struct spi_device *spi)
184{
185 return 0;
186}
187
177static inline unsigned int hw_txbyte(struct nuc900_spi *hw, int count) 188static inline unsigned int hw_txbyte(struct nuc900_spi *hw, int count)
178{ 189{
179 return hw->tx ? hw->tx[count] : 0; 190 return hw->tx ? hw->tx[count] : 0;
@@ -366,8 +377,10 @@ static int nuc900_spi_probe(struct platform_device *pdev)
366 master->num_chipselect = hw->pdata->num_cs; 377 master->num_chipselect = hw->pdata->num_cs;
367 master->bus_num = hw->pdata->bus_num; 378 master->bus_num = hw->pdata->bus_num;
368 hw->bitbang.master = hw->master; 379 hw->bitbang.master = hw->master;
380 hw->bitbang.setup_transfer = nuc900_spi_setupxfer;
369 hw->bitbang.chipselect = nuc900_spi_chipsel; 381 hw->bitbang.chipselect = nuc900_spi_chipsel;
370 hw->bitbang.txrx_bufs = nuc900_spi_txrx; 382 hw->bitbang.txrx_bufs = nuc900_spi_txrx;
383 hw->bitbang.master->setup = nuc900_spi_setup;
371 384
372 hw->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 385 hw->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
373 if (hw->res == NULL) { 386 if (hw->res == NULL) {