Merge branch 'dmaengine' of git://git.linaro.org/people/rmk/linux-arm
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / spi / spi-omap2-mcspi.c
index 26a99ae9a599e7befaba86cde359c2eb997d731b..bc4778175e343c6a9ebeceac09b0cc543c935bc2 100644 (file)
@@ -439,7 +439,8 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer)
 
        if (tx != NULL) {
                wait_for_completion(&mcspi_dma->dma_tx_completion);
-               dma_unmap_single(&spi->dev, xfer->tx_dma, count, DMA_TO_DEVICE);
+               dma_unmap_single(mcspi->dev, xfer->tx_dma, count,
+                                DMA_TO_DEVICE);
 
                /* for TX_ONLY mode, be sure all words have shifted out */
                if (rx == NULL) {
@@ -454,7 +455,8 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer)
 
        if (rx != NULL) {
                wait_for_completion(&mcspi_dma->dma_rx_completion);
-               dma_unmap_single(&spi->dev, xfer->rx_dma, count, DMA_FROM_DEVICE);
+               dma_unmap_single(mcspi->dev, xfer->rx_dma, count,
+                                DMA_FROM_DEVICE);
                omap2_mcspi_set_enable(spi, 0);
 
                elements = element_count - 1;
@@ -1059,7 +1061,7 @@ static int omap2_mcspi_transfer_one_message(struct spi_master *master,
        return 0;
 }
 
-static int __init omap2_mcspi_master_setup(struct omap2_mcspi *mcspi)
+static int __devinit omap2_mcspi_master_setup(struct omap2_mcspi *mcspi)
 {
        struct spi_master       *master = mcspi->master;
        struct omap2_mcspi_regs *ctx = &mcspi->ctx;