diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-10-08 08:33:49 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-25 16:14:27 -0200 |
commit | 8d6b12501a7ebc59c309b32457192bba93334e0b (patch) | |
tree | 9db6f17b11b51beefd9abe3f63f688baa1888b48 /drivers/media/pci | |
parent | 30cfbee36d2fef3bf5a4634a34494bac2df4f271 (diff) | |
download | linux-8d6b12501a7ebc59c309b32457192bba93334e0b.tar.bz2 |
[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: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r-- | drivers/media/pci/cx88/cx88-mpeg.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/pci/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c index d154bc197356..1b7e979b87d3 100644 --- a/drivers/media/pci/cx88/cx88-mpeg.c +++ b/drivers/media/pci/cx88/cx88-mpeg.c @@ -217,8 +217,7 @@ static int cx8802_restart_queue(struct cx8802_dev *dev, return 0; buf = list_entry(q->queued.next, struct cx88_buffer, vb.queue); if (NULL == prev) { - list_del(&buf->vb.queue); - list_add_tail(&buf->vb.queue,&q->active); + list_move_tail(&buf->vb.queue, &q->active); cx8802_start_dma(dev, q, buf); buf->vb.state = VIDEOBUF_ACTIVE; buf->count = q->count++; @@ -229,8 +228,7 @@ static int cx8802_restart_queue(struct cx8802_dev *dev, } 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,&q->active); + list_move_tail(&buf->vb.queue, &q->active); buf->vb.state = VIDEOBUF_ACTIVE; buf->count = q->count++; prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma); |