diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-10-08 08:34:09 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-25 16:14:28 -0200 |
commit | 0666c6b8d60eea25eb2dfa6b4773262ea91cf4a3 (patch) | |
tree | 97673026a8e5206bbd1880f1b3cfdd4954f11ea5 /drivers/media/platform/fsl-viu.c | |
parent | 8d6b12501a7ebc59c309b32457192bba93334e0b (diff) | |
download | talos-obmc-linux-0666c6b8d60eea25eb2dfa6b4773262ea91cf4a3.tar.gz talos-obmc-linux-0666c6b8d60eea25eb2dfa6b4773262ea91cf4a3.zip |
[media] v4l2: use list_move_tail instead of list_del/list_add_tail
Using list_move_tail() instead of list_del() + list_add_tail().
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/fsl-viu.c')
-rw-r--r-- | drivers/media/platform/fsl-viu.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c index 31ac4dc69247..a8ddb0cacab8 100644 --- a/drivers/media/platform/fsl-viu.c +++ b/drivers/media/platform/fsl-viu.c @@ -352,8 +352,7 @@ static int restart_video_queue(struct viu_dmaqueue *vidq) return 0; buf = list_entry(vidq->queued.next, struct viu_buf, vb.queue); if (prev == NULL) { - list_del(&buf->vb.queue); - list_add_tail(&buf->vb.queue, &vidq->active); + list_move_tail(&buf->vb.queue, &vidq->active); dprintk(1, "Restarting video dma\n"); viu_stop_dma(vidq->dev); @@ -367,8 +366,7 @@ static int restart_video_queue(struct viu_dmaqueue *vidq) } else if (prev->vb.width == buf->vb.width && prev->vb.height == buf->vb.height && prev->fmt == buf->fmt) { - list_del(&buf->vb.queue); - list_add_tail(&buf->vb.queue, &vidq->active); + list_move_tail(&buf->vb.queue, &vidq->active); buf->vb.state = VIDEOBUF_ACTIVE; dprintk(2, "[%p/%d] restart_queue - move to active\n", buf, buf->vb.i); |