aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-09-23 19:53:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-09-23 19:53:16 -0400
commitb172e38e435a158cc84169d5b9127a8dd8d21e76 (patch)
tree3a43151f8cc66ad84d043ce7e0e4a462240c6d85
parent8ec9c7fb15fd8edf6b34555f5b498033121b2173 (diff)
parent387719c2ec995019e0af0dc537ca17c9ebd5b64f (diff)
Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6
* 'spi/merge' of git://git.secretlab.ca/git/linux-2.6: spi: Fix WARN when removing spi-fsl-spi module spi/imx: Fix spi-imx when the hardware SPI chipselects are used
-rw-r--r--drivers/spi/spi-fsl-spi.c3
-rw-r--r--drivers/spi/spi-imx.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c
index d2407558773f..24cacff57786 100644
--- a/drivers/spi/spi-fsl-spi.c
+++ b/drivers/spi/spi-fsl-spi.c
@@ -825,6 +825,9 @@ static void fsl_spi_cpm_free(struct mpc8xxx_spi *mspi)
825{ 825{
826 struct device *dev = mspi->dev; 826 struct device *dev = mspi->dev;
827 827
828 if (!(mspi->flags & SPI_CPM_MODE))
829 return;
830
828 dma_unmap_single(dev, mspi->dma_dummy_rx, SPI_MRBLR, DMA_FROM_DEVICE); 831 dma_unmap_single(dev, mspi->dma_dummy_rx, SPI_MRBLR, DMA_FROM_DEVICE);
829 dma_unmap_single(dev, mspi->dma_dummy_tx, PAGE_SIZE, DMA_TO_DEVICE); 832 dma_unmap_single(dev, mspi->dma_dummy_tx, PAGE_SIZE, DMA_TO_DEVICE);
830 cpm_muram_free(cpm_muram_offset(mspi->tx_bd)); 833 cpm_muram_free(cpm_muram_offset(mspi->tx_bd));
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 8ac6542aedcd..fa594d604aca 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -786,9 +786,11 @@ static int __devinit spi_imx_probe(struct platform_device *pdev)
786 int cs_gpio = of_get_named_gpio(np, "cs-gpios", i); 786 int cs_gpio = of_get_named_gpio(np, "cs-gpios", i);
787 if (cs_gpio < 0) 787 if (cs_gpio < 0)
788 cs_gpio = mxc_platform_info->chipselect[i]; 788 cs_gpio = mxc_platform_info->chipselect[i];
789
790 spi_imx->chipselect[i] = cs_gpio;
789 if (cs_gpio < 0) 791 if (cs_gpio < 0)
790 continue; 792 continue;
791 spi_imx->chipselect[i] = cs_gpio; 793
792 ret = gpio_request(spi_imx->chipselect[i], DRIVER_NAME); 794 ret = gpio_request(spi_imx->chipselect[i], DRIVER_NAME);
793 if (ret) { 795 if (ret) {
794 while (i > 0) { 796 while (i > 0) {