summaryrefslogtreecommitdiffstats
path: root/drivers/spi/davinci_spi.c
diff options
context:
space:
mode:
authorBrian Niebuhr <bniebuhr@efjohnson.com>2010-09-24 15:23:32 +0200
committerSekhar Nori <nsekhar@ti.com>2010-11-18 14:08:33 +0100
commitb23a5d4691043e97bbfde8c2fb5b8fecdc400308 (patch)
tree8b6f66d23306761140b9501357fe9948ce5001c9 /drivers/spi/davinci_spi.c
parentspi: davinci: remove unnecessary function davinci_spi_bufs_prep() (diff)
downloadlinux-b23a5d4691043e97bbfde8c2fb5b8fecdc400308.tar.xz
linux-b23a5d4691043e97bbfde8c2fb5b8fecdc400308.zip
spi: davinci: remove unnecessary call to davinci_spi_setup_transfer()
Remove unnecessary call to davinci_spi_setup_transfer() at the end of davinci_spi_setup(). davinci_spi_setup_transfer() is registered as the setup_transfer callback for the bitbang layer and is called independently by the bitbang layer to setup the transfer before it begins. Signed-off-by: Brian Niebuhr <bniebuhr@efjohnson.com> Tested-By: Michael Williamson <michael.williamson@criticallink.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'drivers/spi/davinci_spi.c')
-rw-r--r--drivers/spi/davinci_spi.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
index 05b6145da3ef..77109dc11b09 100644
--- a/drivers/spi/davinci_spi.c
+++ b/drivers/spi/davinci_spi.c
@@ -479,7 +479,7 @@ static int davinci_spi_request_dma(struct spi_device *spi)
*/
static int davinci_spi_setup(struct spi_device *spi)
{
- int retval;
+ int retval = 0;
struct davinci_spi *davinci_spi;
struct davinci_spi_dma *davinci_spi_dma;
struct davinci_spi_platform_data *pdata;
@@ -512,16 +512,11 @@ static int davinci_spi_setup(struct spi_device *spi)
if (use_dma && davinci_spi->dma_channels) {
davinci_spi_dma = &davinci_spi->dma_channels[spi->chip_select];
- if ((davinci_spi_dma->dma_rx_channel == -1)
- || (davinci_spi_dma->dma_tx_channel == -1)) {
+ if ((davinci_spi_dma->dma_rx_channel == -1) ||
+ (davinci_spi_dma->dma_tx_channel == -1))
retval = davinci_spi_request_dma(spi);
- if (retval < 0)
- return retval;
- }
}
- retval = davinci_spi_setup_transfer(spi, NULL);
-
return retval;
}