spi/s3c64xx: Remove code no longer needed as a result of S3C_DMA removal
authorMark Brown <broonie@linaro.org>
Fri, 7 Feb 2014 12:39:22 +0000 (12:39 +0000)
committerMark Brown <broonie@linaro.org>
Fri, 7 Feb 2014 13:27:58 +0000 (13:27 +0000)
Remove functions that only had an effect when using S3C_DMA and inline
dmaengine_terminate_all() since it's pointless to have a function which
expands to a single function call.

Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-s3c64xx.c

index 18ec7e65a31978b557443d0657ab916b4730d373..9ad5e3e76b96682dc6755932f1889b445ad6d7be 100644 (file)
@@ -277,17 +277,6 @@ static void s3c64xx_spi_dmacb(void *data)
        spin_unlock_irqrestore(&sdd->lock, flags);
 }
 
-static int s3c64xx_spi_map_mssg(struct s3c64xx_spi_driver_data *sdd,
-                                               struct spi_message *msg)
-{
-       return 0;
-}
-
-static void s3c64xx_spi_unmap_mssg(struct s3c64xx_spi_driver_data *sdd,
-                                               struct spi_message *msg)
-{
-}
-
 static void prepare_dma(struct s3c64xx_spi_dma_data *dma,
                        struct sg_table *sgt)
 {
@@ -387,12 +376,6 @@ static int s3c64xx_spi_unprepare_transfer(struct spi_master *spi)
        return 0;
 }
 
-static void s3c64xx_spi_dma_stop(struct s3c64xx_spi_driver_data *sdd,
-                                struct s3c64xx_spi_dma_data *dma)
-{
-       dmaengine_terminate_all(dma->ch);
-}
-
 static bool s3c64xx_spi_can_dma(struct spi_master *master,
                                struct spi_device *spi,
                                struct spi_transfer *xfer)
@@ -691,13 +674,6 @@ static int s3c64xx_spi_prepare_message(struct spi_master *master,
                s3c64xx_spi_config(sdd);
        }
 
-       /* Map all the transfers if needed */
-       if (s3c64xx_spi_map_mssg(sdd, msg)) {
-               dev_err(&spi->dev,
-                       "Xfer: Unable to map message buffers!\n");
-               return -ENOMEM;
-       }
-
        /* Configure feedback delay */
        writel(cs->fb_delay & 0x3, sdd->regs + S3C64XX_SPI_FB_CLK);
 
@@ -769,10 +745,10 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master,
                if (use_dma) {
                        if (xfer->tx_buf != NULL
                            && (sdd->state & TXBUSY))
-                               s3c64xx_spi_dma_stop(sdd, &sdd->tx_dma);
+                               dmaengine_terminate_all(sdd->tx_dma.ch);
                        if (xfer->rx_buf != NULL
                            && (sdd->state & RXBUSY))
-                               s3c64xx_spi_dma_stop(sdd, &sdd->rx_dma);
+                               dmaengine_terminate_all(sdd->rx_dma.ch);
                }
        } else {
                flush_fifo(sdd);
@@ -781,16 +757,6 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master,
        return status;
 }
 
-static int s3c64xx_spi_unprepare_message(struct spi_master *master,
-                                           struct spi_message *msg)
-{
-       struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master);
-
-       s3c64xx_spi_unmap_mssg(sdd, msg);
-
-       return 0;
-}
-
 static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata(
                                struct spi_device *spi)
 {
@@ -1164,7 +1130,6 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
        master->prepare_transfer_hardware = s3c64xx_spi_prepare_transfer;
        master->prepare_message = s3c64xx_spi_prepare_message;
        master->transfer_one = s3c64xx_spi_transfer_one;
-       master->unprepare_message = s3c64xx_spi_unprepare_message;
        master->unprepare_transfer_hardware = s3c64xx_spi_unprepare_transfer;
        master->num_chipselect = sci->num_cs;
        master->dma_alignment = 8;