diff options
Diffstat (limited to 'drivers/spi/spi-altera.c')
| -rw-r--r-- | drivers/spi/spi-altera.c | 11 | 
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c index 9a64c3fee21..5b5709a5c95 100644 --- a/drivers/spi/spi-altera.c +++ b/drivers/spi/spi-altera.c @@ -13,7 +13,6 @@   * published by the Free Software Foundation.   */ -#include <linux/init.h>  #include <linux/interrupt.h>  #include <linux/errno.h>  #include <linux/module.h> @@ -200,7 +199,6 @@ static irqreturn_t altera_spi_irq(int irq, void *dev)  static int altera_spi_probe(struct platform_device *pdev)  { -	struct altera_spi_platform_data *platp = dev_get_platdata(&pdev->dev);  	struct altera_spi *hw;  	struct spi_master *master;  	struct resource *res; @@ -214,14 +212,14 @@ 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->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 16); +	master->dev.of_node = pdev->dev.of_node;  	hw = spi_master_get_devdata(master);  	platform_set_drvdata(pdev, hw);  	/* setup the state for the bitbang driver */ -	hw->bitbang.master = spi_master_get(master); -	if (!hw->bitbang.master) -		return err; +	hw->bitbang.master = master;  	hw->bitbang.chipselect = altera_spi_chipsel;  	hw->bitbang.txrx_bufs = altera_spi_txrx; @@ -247,9 +245,6 @@ static int altera_spi_probe(struct platform_device *pdev)  		if (err)  			goto exit;  	} -	/* find platform data */ -	if (!platp) -		hw->bitbang.master->dev.of_node = pdev->dev.of_node;  	/* register our spi controller */  	err = spi_bitbang_start(&hw->bitbang);  | 
