aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-altera.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-altera.c')
-rw-r--r--drivers/spi/spi-altera.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c
index 5d7deaf62867..5b5709a5c957 100644
--- a/drivers/spi/spi-altera.c
+++ b/drivers/spi/spi-altera.c
@@ -13,7 +13,6 @@
13 * published by the Free Software Foundation. 13 * published by the Free Software Foundation.
14 */ 14 */
15 15
16#include <linux/init.h>
17#include <linux/interrupt.h> 16#include <linux/interrupt.h>
18#include <linux/errno.h> 17#include <linux/errno.h>
19#include <linux/module.h> 18#include <linux/module.h>
@@ -200,7 +199,6 @@ static irqreturn_t altera_spi_irq(int irq, void *dev)
200 199
201static int altera_spi_probe(struct platform_device *pdev) 200static int altera_spi_probe(struct platform_device *pdev)
202{ 201{
203 struct altera_spi_platform_data *platp = dev_get_platdata(&pdev->dev);
204 struct altera_spi *hw; 202 struct altera_spi *hw;
205 struct spi_master *master; 203 struct spi_master *master;
206 struct resource *res; 204 struct resource *res;
@@ -214,6 +212,8 @@ static int altera_spi_probe(struct platform_device *pdev)
214 master->bus_num = pdev->id; 212 master->bus_num = pdev->id;
215 master->num_chipselect = 16; 213 master->num_chipselect = 16;
216 master->mode_bits = SPI_CS_HIGH; 214 master->mode_bits = SPI_CS_HIGH;
215 master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 16);
216 master->dev.of_node = pdev->dev.of_node;
217 217
218 hw = spi_master_get_devdata(master); 218 hw = spi_master_get_devdata(master);
219 platform_set_drvdata(pdev, hw); 219 platform_set_drvdata(pdev, hw);
@@ -245,9 +245,6 @@ static int altera_spi_probe(struct platform_device *pdev)
245 if (err) 245 if (err)
246 goto exit; 246 goto exit;
247 } 247 }
248 /* find platform data */
249 if (!platp)
250 hw->bitbang.master->dev.of_node = pdev->dev.of_node;
251 248
252 /* register our spi controller */ 249 /* register our spi controller */
253 err = spi_bitbang_start(&hw->bitbang); 250 err = spi_bitbang_start(&hw->bitbang);