Commit 8d6b1250 authored by Wei Yongjun's avatar Wei Yongjun Committed by Mauro Carvalho Chehab

[media] cx88: 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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 30cfbee3
...@@ -217,8 +217,7 @@ static int cx8802_restart_queue(struct cx8802_dev *dev, ...@@ -217,8 +217,7 @@ static int cx8802_restart_queue(struct cx8802_dev *dev,
return 0; return 0;
buf = list_entry(q->queued.next, struct cx88_buffer, vb.queue); buf = list_entry(q->queued.next, struct cx88_buffer, vb.queue);
if (NULL == prev) { if (NULL == prev) {
list_del(&buf->vb.queue); list_move_tail(&buf->vb.queue, &q->active);
list_add_tail(&buf->vb.queue,&q->active);
cx8802_start_dma(dev, q, buf); cx8802_start_dma(dev, q, buf);
buf->vb.state = VIDEOBUF_ACTIVE; buf->vb.state = VIDEOBUF_ACTIVE;
buf->count = q->count++; buf->count = q->count++;
...@@ -229,8 +228,7 @@ static int cx8802_restart_queue(struct cx8802_dev *dev, ...@@ -229,8 +228,7 @@ static int cx8802_restart_queue(struct cx8802_dev *dev,
} else if (prev->vb.width == buf->vb.width && } else if (prev->vb.width == buf->vb.width &&
prev->vb.height == buf->vb.height && prev->vb.height == buf->vb.height &&
prev->fmt == buf->fmt) { prev->fmt == buf->fmt) {
list_del(&buf->vb.queue); list_move_tail(&buf->vb.queue, &q->active);
list_add_tail(&buf->vb.queue,&q->active);
buf->vb.state = VIDEOBUF_ACTIVE; buf->vb.state = VIDEOBUF_ACTIVE;
buf->count = q->count++; buf->count = q->count++;
prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma); prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment