diff options
| author | Paul Moore <pmoore@redhat.com> | 2014-03-31 09:49:07 -0400 |
|---|---|---|
| committer | Paul Moore <pmoore@redhat.com> | 2014-03-31 09:49:07 -0400 |
| commit | 6d32c850621b0be75777b9102b14f6268bbd9f0f (patch) | |
| tree | fec325f5c1ae763f5eccb3ca1254ab9d9d164b05 /drivers/spi/spi-fsl-dspi.c | |
| parent | eee3094683fbc7fe6bcdaef58c1ef31f8460cdca (diff) | |
| parent | 455c6fdbd219161bd09b1165f11699d6d73de11c (diff) | |
Merge tag 'v3.14' into next
Linux 3.14
Diffstat (limited to 'drivers/spi/spi-fsl-dspi.c')
| -rw-r--r-- | drivers/spi/spi-fsl-dspi.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index 8641b03bdd7a..a25392065d9b 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -320,8 +320,10 @@ static void dspi_chipselect(struct spi_device *spi, int value) switch (value) { case BITBANG_CS_ACTIVE: pushr |= SPI_PUSHR_CONT; + break; case BITBANG_CS_INACTIVE: pushr &= ~SPI_PUSHR_CONT; + break; } writel(pushr, dspi->base + SPI_PUSHR); @@ -373,9 +375,6 @@ static int dspi_setup(struct spi_device *spi) if (!spi->max_speed_hz) return -EINVAL; - if (!spi->bits_per_word) - spi->bits_per_word = 8; - return dspi_setup_transfer(spi, NULL); } @@ -421,7 +420,6 @@ static int dspi_suspend(struct device *dev) static int dspi_resume(struct device *dev) { - struct spi_master *master = dev_get_drvdata(dev); struct fsl_dspi *dspi = spi_master_get_devdata(master); @@ -505,7 +503,7 @@ static int dspi_probe(struct platform_device *pdev) clk_prepare_enable(dspi->clk); init_waitqueue_head(&dspi->waitq); - platform_set_drvdata(pdev, dspi); + platform_set_drvdata(pdev, master); ret = spi_bitbang_start(&dspi->bitbang); if (ret != 0) { @@ -526,7 +524,8 @@ out_master_put: static int dspi_remove(struct platform_device *pdev) { - struct fsl_dspi *dspi = platform_get_drvdata(pdev); + struct spi_master *master = platform_get_drvdata(pdev); + struct fsl_dspi *dspi = spi_master_get_devdata(master); /* Disconnect from the SPI framework */ spi_bitbang_stop(&dspi->bitbang); |
