Skip to content

Commit

Permalink
spi: atmel: remove compat for non DT board when requesting dma chan
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ludovic Desroches authored and Mark Brown committed Nov 24, 2014
1 parent c1ee8f3 commit 7758e39
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions drivers/spi/spi-atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,23 +417,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;
Expand All @@ -444,19 +427,15 @@ 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");
err = -EBUSY;
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,
Expand Down

0 comments on commit 7758e39

Please sign in to comment.