aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-atmel.c
diff options
context:
space:
mode:
authorLudovic Desroches <ludovic.desroches@atmel.com>2014-11-14 11:12:53 -0500
committerMark Brown <broonie@kernel.org>2014-11-24 13:57:37 -0500
commit7758e390699fb25bf91642d52734200db38e764b (patch)
tree06b90da9a3d4383792110abaf42a48dbb1de7b2e /drivers/spi/spi-atmel.c
parentc1ee8f3fdff2b5763fe13be0a50a7ab3df015f5b (diff)
spi: atmel: remove compat for non DT board when requesting dma chan
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> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-atmel.c')
-rw-r--r--drivers/spi/spi-atmel.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 6ed18934dffe..3370a3dfd883 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -417,23 +417,6 @@ static int atmel_spi_dma_slave_config(struct atmel_spi *as,
417 return err; 417 return err;
418} 418}
419 419
420static bool filter(struct dma_chan *chan, void *pdata)
421{
422 struct atmel_spi_dma *sl_pdata = pdata;
423 struct at_dma_slave *sl;
424
425 if (!sl_pdata)
426 return false;
427
428 sl = &sl_pdata->dma_slave;
429 if (sl->dma_dev == chan->device->dev) {
430 chan->private = sl;
431 return true;
432 } else {
433 return false;
434 }
435}
436
437static int atmel_spi_configure_dma(struct atmel_spi *as) 420static int atmel_spi_configure_dma(struct atmel_spi *as)
438{ 421{
439 struct dma_slave_config slave_config; 422 struct dma_slave_config slave_config;
@@ -444,9 +427,7 @@ static int atmel_spi_configure_dma(struct atmel_spi *as)
444 dma_cap_zero(mask); 427 dma_cap_zero(mask);
445 dma_cap_set(DMA_SLAVE, mask); 428 dma_cap_set(DMA_SLAVE, mask);
446 429
447 as->dma.chan_tx = dma_request_slave_channel_compat(mask, filter, 430 as->dma.chan_tx = dma_request_slave_channel(dev, "tx");
448 &as->dma,
449 dev, "tx");
450 if (!as->dma.chan_tx) { 431 if (!as->dma.chan_tx) {
451 dev_err(dev, 432 dev_err(dev,
452 "DMA TX channel not available, SPI unable to use DMA\n"); 433 "DMA TX channel not available, SPI unable to use DMA\n");
@@ -454,9 +435,7 @@ static int atmel_spi_configure_dma(struct atmel_spi *as)
454 goto error; 435 goto error;
455 } 436 }
456 437
457 as->dma.chan_rx = dma_request_slave_channel_compat(mask, filter, 438 as->dma.chan_rx = dma_request_slave_channel(dev, "rx");
458 &as->dma,
459 dev, "rx");
460 439
461 if (!as->dma.chan_rx) { 440 if (!as->dma.chan_rx) {
462 dev_err(dev, 441 dev_err(dev,