diff mbox

[1/2] spi: atmel: remove compat for non DT board when requesting dma chan

Message ID 1415981574-11165-1-git-send-email-ludovic.desroches@atmel.com (mailing list archive)
State Accepted
Commit 7758e390699fb25bf91642d52734200db38e764b
Headers show

Commit Message

Ludovic Desroches Nov. 14, 2014, 4:12 p.m. UTC
All boards with a dma controller have DT support so using
dma_request_slave_channel_compat is no more needed.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
---
 drivers/spi/spi-atmel.c | 25 ++-----------------------
 1 file changed, 2 insertions(+), 23 deletions(-)

Comments

Mark Brown Nov. 24, 2014, 6:57 p.m. UTC | #1
On Fri, Nov 14, 2014 at 05:12:53PM +0100, Ludovic Desroches wrote:
> All boards with a dma controller have DT support so using
> dma_request_slave_channel_compat is no more needed.

Applied both, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 649dcb5..f1760fa 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -414,23 +414,6 @@  static int atmel_spi_dma_slave_config(struct atmel_spi *as,
 	return err;
 }
 
-static bool filter(struct dma_chan *chan, void *pdata)
-{
-	struct atmel_spi_dma *sl_pdata = pdata;
-	struct at_dma_slave *sl;
-
-	if (!sl_pdata)
-		return false;
-
-	sl = &sl_pdata->dma_slave;
-	if (sl->dma_dev == chan->device->dev) {
-		chan->private = sl;
-		return true;
-	} else {
-		return false;
-	}
-}
-
 static int atmel_spi_configure_dma(struct atmel_spi *as)
 {
 	struct dma_slave_config	slave_config;
@@ -441,9 +424,7 @@  static int atmel_spi_configure_dma(struct atmel_spi *as)
 	dma_cap_zero(mask);
 	dma_cap_set(DMA_SLAVE, mask);
 
-	as->dma.chan_tx = dma_request_slave_channel_compat(mask, filter,
-							   &as->dma,
-							   dev, "tx");
+	as->dma.chan_tx = dma_request_slave_channel(dev, "tx");
 	if (!as->dma.chan_tx) {
 		dev_err(dev,
 			"DMA TX channel not available, SPI unable to use DMA\n");
@@ -451,9 +432,7 @@  static int atmel_spi_configure_dma(struct atmel_spi *as)
 		goto error;
 	}
 
-	as->dma.chan_rx = dma_request_slave_channel_compat(mask, filter,
-							   &as->dma,
-							   dev, "rx");
+	as->dma.chan_rx = dma_request_slave_channel(dev, "rx");
 
 	if (!as->dma.chan_rx) {
 		dev_err(dev,