Skip to content

Commit

Permalink
ata: pata_pxa: remove the dmaengine compat need
Browse files Browse the repository at this point in the history
As the pxa architecture switched towards the dmaengine slave map, the
old compatibility mechanism to acquire the dma requestor line number and
priority are not needed anymore.

This patch simplifies the dma resource acquisition, using the more
generic function dma_request_slave_channel().

Signed-off-by: Robert Jarzmik <[email protected]>
Acked-by: Bartlomiej Zolnierkiewicz <[email protected]>
  • Loading branch information
rjarzmik committed Jun 18, 2018
1 parent ac75a50 commit 273340e
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions drivers/ata/pata_pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <linux/libata.h>
#include <linux/platform_device.h>
#include <linux/dmaengine.h>
#include <linux/dma/pxa-dma.h>
#include <linux/gpio.h>
#include <linux/slab.h>
#include <linux/completion.h>
Expand Down Expand Up @@ -180,8 +179,6 @@ static int pxa_ata_probe(struct platform_device *pdev)
struct resource *irq_res;
struct pata_pxa_pdata *pdata = dev_get_platdata(&pdev->dev);
struct dma_slave_config config;
dma_cap_mask_t mask;
struct pxad_param param;
int ret = 0;

/*
Expand Down Expand Up @@ -278,10 +275,6 @@ static int pxa_ata_probe(struct platform_device *pdev)

ap->private_data = data;

dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
param.prio = PXAD_PRIO_LOWEST;
param.drcmr = pdata->dma_dreq;
memset(&config, 0, sizeof(config));
config.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
config.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
Expand All @@ -294,8 +287,7 @@ static int pxa_ata_probe(struct platform_device *pdev)
* Request the DMA channel
*/
data->dma_chan =
dma_request_slave_channel_compat(mask, pxad_filter_fn,
&param, &pdev->dev, "data");
dma_request_slave_channel(&pdev->dev, "data");
if (!data->dma_chan)
return -EBUSY;
ret = dmaengine_slave_config(data->dma_chan, &config);
Expand Down

0 comments on commit 273340e

Please sign in to comment.