summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-altera.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-altera.c
parented893559c9799df3b32051871c22017151394d82 (diff)
downloadop-kernel-dev-103ccee4ef1595468cf79c93068d253c7f2d85a8.zip
op-kernel-dev-103ccee4ef1595468cf79c93068d253c7f2d85a8.tar.gz
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-altera.c')
-rw-r--r--drivers/spi/spi-altera.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c
index 8a6bb37..81b9adb 100644
--- a/drivers/spi/spi-altera.c
+++ b/drivers/spi/spi-altera.c
@@ -103,6 +103,16 @@ static void altera_spi_chipsel(struct spi_device *spi, int value)
}
}
+static int altera_spi_setupxfer(struct spi_device *spi, struct spi_transfer *t)
+{
+ return 0;
+}
+
+static int altera_spi_setup(struct spi_device *spi)
+{
+ return 0;
+}
+
static inline unsigned int hw_txbyte(struct altera_spi *hw, int count)
{
if (hw->tx) {
@@ -221,6 +231,7 @@ static int altera_spi_probe(struct platform_device *pdev)
master->bus_num = pdev->id;
master->num_chipselect = 16;
master->mode_bits = SPI_CS_HIGH;
+ master->setup = altera_spi_setup;
hw = spi_master_get_devdata(master);
platform_set_drvdata(pdev, hw);
@@ -229,6 +240,7 @@ static int altera_spi_probe(struct platform_device *pdev)
hw->bitbang.master = spi_master_get(master);
if (!hw->bitbang.master)
return err;
+ hw->bitbang.setup_transfer = altera_spi_setupxfer;
hw->bitbang.chipselect = altera_spi_chipsel;
hw->bitbang.txrx_bufs = altera_spi_txrx;
OpenPOWER on IntegriCloud