diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-10-08 07:34:09 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-25 14:14:28 -0400 |
commit | 0666c6b8d60eea25eb2dfa6b4773262ea91cf4a3 (patch) | |
tree | 97673026a8e5206bbd1880f1b3cfdd4954f11ea5 /drivers/media/platform | |
parent | 8d6b12501a7ebc59c309b32457192bba93334e0b (diff) |
[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')
-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) | |||
352 | return 0; | 352 | return 0; |
353 | buf = list_entry(vidq->queued.next, struct viu_buf, vb.queue); | 353 | buf = list_entry(vidq->queued.next, struct viu_buf, vb.queue); |
354 | if (prev == NULL) { | 354 | if (prev == NULL) { |
355 | list_del(&buf->vb.queue); | 355 | list_move_tail(&buf->vb.queue, &vidq->active); |
356 | list_add_tail(&buf->vb.queue, &vidq->active); | ||
357 | 356 | ||
358 | dprintk(1, "Restarting video dma\n"); | 357 | dprintk(1, "Restarting video dma\n"); |
359 | viu_stop_dma(vidq->dev); | 358 | viu_stop_dma(vidq->dev); |
@@ -367,8 +366,7 @@ static int restart_video_queue(struct viu_dmaqueue *vidq) | |||
367 | } else if (prev->vb.width == buf->vb.width && | 366 | } else if (prev->vb.width == buf->vb.width && |
368 | prev->vb.height == buf->vb.height && | 367 | prev->vb.height == buf->vb.height && |
369 | prev->fmt == buf->fmt) { | 368 | prev->fmt == buf->fmt) { |
370 | list_del(&buf->vb.queue); | 369 | list_move_tail(&buf->vb.queue, &vidq->active); |
371 | list_add_tail(&buf->vb.queue, &vidq->active); | ||
372 | buf->vb.state = VIDEOBUF_ACTIVE; | 370 | buf->vb.state = VIDEOBUF_ACTIVE; |
373 | dprintk(2, "[%p/%d] restart_queue - move to active\n", | 371 | dprintk(2, "[%p/%d] restart_queue - move to active\n", |
374 | buf, buf->vb.i); | 372 | buf, buf->vb.i); |