summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-nuc900.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2013-07-10 10:38:18 -0600
committerMark Brown <broonie@linaro.org>2013-07-11 11:35:25 +0100
commit103ccee4ef1595468cf79c93068d253c7f2d85a8 (patch)
treeb7aa936bca89bee352b1b52e5628e55ac89b7931 /drivers/spi/spi-nuc900.c
parented893559c9799df3b32051871c22017151394d82 (diff)
downloadlinux-stable-103ccee4ef1595468cf79c93068d253c7f2d85a8.tar.gz
linux-stable-103ccee4ef1595468cf79c93068d253c7f2d85a8.tar.bz2
linux-stable-103ccee4ef1595468cf79c93068d253c7f2d85a8.zip
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)
spin_unlock_irqrestore(&hw->lock, flags);
}
+static int nuc900_spi_setupxfer(struct spi_device *spi,
+ struct spi_transfer *t)
+{
+ return 0;
+}
+
+static int nuc900_spi_setup(struct spi_device *spi)
+{
+ return 0;
+}
+
static inline unsigned int hw_txbyte(struct nuc900_spi *hw, int count)
{
return hw->tx ? hw->tx[count] : 0;
@@ -366,8 +377,10 @@ static int nuc900_spi_probe(struct platform_device *pdev)
master->num_chipselect = hw->pdata->num_cs;
master->bus_num = hw->pdata->bus_num;
hw->bitbang.master = hw->master;
+ hw->bitbang.setup_transfer = nuc900_spi_setupxfer;
hw->bitbang.chipselect = nuc900_spi_chipsel;
hw->bitbang.txrx_bufs = nuc900_spi_txrx;
+ hw->bitbang.master->setup = nuc900_spi_setup;
hw->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (hw->res == NULL) {