summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/blackfin/bfin_capture.c
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2014-07-23 06:57:15 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-26 17:14:14 -0300
commit7ba3c21c17d0fec397dc5e0337a3548eb14220bd (patch)
tree2d9bcdd864ac7ec57fe1f6b512a1beb6169a0020 /drivers/media/platform/blackfin/bfin_capture.c
parentf7d0e6d67fdc300c316dfb7ca1d4aaa234171053 (diff)
downloadlinux-7ba3c21c17d0fec397dc5e0337a3548eb14220bd.tar.gz
linux-7ba3c21c17d0fec397dc5e0337a3548eb14220bd.tar.bz2
linux-7ba3c21c17d0fec397dc5e0337a3548eb14220bd.zip
[media] v4l2: bfin: Ensure delete and reinit list entry on NOMMU architecture
On NOMMU architecture page fault is not triggered if a deleted list entry is accessed without reinit. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/blackfin/bfin_capture.c')
-rw-r--r--drivers/media/platform/blackfin/bfin_capture.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c
index 7c70d5104417..9b5daa65841c 100644
--- a/drivers/media/platform/blackfin/bfin_capture.c
+++ b/drivers/media/platform/blackfin/bfin_capture.c
@@ -446,7 +446,7 @@ static void bcap_stop_streaming(struct vb2_queue *vq)
while (!list_empty(&bcap_dev->dma_queue)) {
bcap_dev->cur_frm = list_entry(bcap_dev->dma_queue.next,
struct bcap_buffer, list);
- list_del(&bcap_dev->cur_frm->list);
+ list_del_init(&bcap_dev->cur_frm->list);
vb2_buffer_done(&bcap_dev->cur_frm->vb, VB2_BUF_STATE_ERROR);
}
}
@@ -533,7 +533,7 @@ static irqreturn_t bcap_isr(int irq, void *dev_id)
}
bcap_dev->cur_frm = list_entry(bcap_dev->dma_queue.next,
struct bcap_buffer, list);
- list_del(&bcap_dev->cur_frm->list);
+ list_del_init(&bcap_dev->cur_frm->list);
} else {
/* clear error flag, we will get a new frame */
if (ppi->err)
@@ -583,7 +583,7 @@ static int bcap_streamon(struct file *file, void *priv,
bcap_dev->cur_frm = list_entry(bcap_dev->dma_queue.next,
struct bcap_buffer, list);
/* remove buffer from the dma queue */
- list_del(&bcap_dev->cur_frm->list);
+ list_del_init(&bcap_dev->cur_frm->list);
addr = vb2_dma_contig_plane_dma_addr(&bcap_dev->cur_frm->vb, 0);
/* update DMA address */
ppi->ops->update_addr(ppi, (unsigned long)addr);