diff options
Diffstat (limited to 'drivers/media/video/pxa_camera.c')
-rw-r--r-- | drivers/media/video/pxa_camera.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index cfa113cedd3e..c639845460ff 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -566,15 +566,6 @@ static void pxa_dma_stop_channels(struct pxa_camera_dev *pcdev) | |||
566 | } | 566 | } |
567 | } | 567 | } |
568 | 568 | ||
569 | static void pxa_dma_update_sg_tail(struct pxa_camera_dev *pcdev, | ||
570 | struct pxa_buffer *buf) | ||
571 | { | ||
572 | int i; | ||
573 | |||
574 | for (i = 0; i < pcdev->channels; i++) | ||
575 | pcdev->sg_tail[i] = buf->dmas[i].sg_cpu + buf->dmas[i].sglen; | ||
576 | } | ||
577 | |||
578 | static void pxa_dma_add_tail_buf(struct pxa_camera_dev *pcdev, | 569 | static void pxa_dma_add_tail_buf(struct pxa_camera_dev *pcdev, |
579 | struct pxa_buffer *buf) | 570 | struct pxa_buffer *buf) |
580 | { | 571 | { |
@@ -585,12 +576,13 @@ static void pxa_dma_add_tail_buf(struct pxa_camera_dev *pcdev, | |||
585 | buf_last_desc = buf->dmas[i].sg_cpu + buf->dmas[i].sglen; | 576 | buf_last_desc = buf->dmas[i].sg_cpu + buf->dmas[i].sglen; |
586 | buf_last_desc->ddadr = DDADR_STOP; | 577 | buf_last_desc->ddadr = DDADR_STOP; |
587 | 578 | ||
588 | if (!pcdev->sg_tail[i]) | 579 | if (pcdev->sg_tail[i]) |
589 | continue; | 580 | /* Link the new buffer to the old tail */ |
590 | pcdev->sg_tail[i]->ddadr = buf->dmas[i].sg_dma; | 581 | pcdev->sg_tail[i]->ddadr = buf->dmas[i].sg_dma; |
591 | } | ||
592 | 582 | ||
593 | pxa_dma_update_sg_tail(pcdev, buf); | 583 | /* Update the channel tail */ |
584 | pcdev->sg_tail[i] = buf_last_desc; | ||
585 | } | ||
594 | } | 586 | } |
595 | 587 | ||
596 | /** | 588 | /** |