mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 09:50:04 +00:00
media: pxa_camera: remove the dmaengine compat need
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 <robert.jarzmik@free.fr> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
6b3348f9e6
commit
f727b6cda4
1 changed files with 3 additions and 19 deletions
|
@ -2375,8 +2375,6 @@ static int pxa_camera_probe(struct platform_device *pdev)
|
||||||
.src_maxburst = 8,
|
.src_maxburst = 8,
|
||||||
.direction = DMA_DEV_TO_MEM,
|
.direction = DMA_DEV_TO_MEM,
|
||||||
};
|
};
|
||||||
dma_cap_mask_t mask;
|
|
||||||
struct pxad_param params;
|
|
||||||
char clk_name[V4L2_CLK_NAME_SIZE];
|
char clk_name[V4L2_CLK_NAME_SIZE];
|
||||||
int irq;
|
int irq;
|
||||||
int err = 0, i;
|
int err = 0, i;
|
||||||
|
@ -2450,34 +2448,20 @@ static int pxa_camera_probe(struct platform_device *pdev)
|
||||||
pcdev->base = base;
|
pcdev->base = base;
|
||||||
|
|
||||||
/* request dma */
|
/* request dma */
|
||||||
dma_cap_zero(mask);
|
pcdev->dma_chans[0] = dma_request_slave_channel(&pdev->dev, "CI_Y");
|
||||||
dma_cap_set(DMA_SLAVE, mask);
|
|
||||||
dma_cap_set(DMA_PRIVATE, mask);
|
|
||||||
|
|
||||||
params.prio = 0;
|
|
||||||
params.drcmr = 68;
|
|
||||||
pcdev->dma_chans[0] =
|
|
||||||
dma_request_slave_channel_compat(mask, pxad_filter_fn,
|
|
||||||
¶ms, &pdev->dev, "CI_Y");
|
|
||||||
if (!pcdev->dma_chans[0]) {
|
if (!pcdev->dma_chans[0]) {
|
||||||
dev_err(&pdev->dev, "Can't request DMA for Y\n");
|
dev_err(&pdev->dev, "Can't request DMA for Y\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
params.drcmr = 69;
|
pcdev->dma_chans[1] = dma_request_slave_channel(&pdev->dev, "CI_U");
|
||||||
pcdev->dma_chans[1] =
|
|
||||||
dma_request_slave_channel_compat(mask, pxad_filter_fn,
|
|
||||||
¶ms, &pdev->dev, "CI_U");
|
|
||||||
if (!pcdev->dma_chans[1]) {
|
if (!pcdev->dma_chans[1]) {
|
||||||
dev_err(&pdev->dev, "Can't request DMA for Y\n");
|
dev_err(&pdev->dev, "Can't request DMA for Y\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto exit_free_dma_y;
|
goto exit_free_dma_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
params.drcmr = 70;
|
pcdev->dma_chans[2] = dma_request_slave_channel(&pdev->dev, "CI_V");
|
||||||
pcdev->dma_chans[2] =
|
|
||||||
dma_request_slave_channel_compat(mask, pxad_filter_fn,
|
|
||||||
¶ms, &pdev->dev, "CI_V");
|
|
||||||
if (!pcdev->dma_chans[2]) {
|
if (!pcdev->dma_chans[2]) {
|
||||||
dev_err(&pdev->dev, "Can't request DMA for V\n");
|
dev_err(&pdev->dev, "Can't request DMA for V\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
|
|
Loading…
Reference in a new issue