From patchwork Mon Oct 8 12:33:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1565311 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 5628A40135 for ; Mon, 8 Oct 2012 12:33:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752093Ab2JHMdt (ORCPT ); Mon, 8 Oct 2012 08:33:49 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:54249 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751845Ab2JHMdt (ORCPT ); Mon, 8 Oct 2012 08:33:49 -0400 Received: by mail-qc0-f174.google.com with SMTP id d3so2796440qch.19 for ; Mon, 08 Oct 2012 05:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=GhhPNfT5ETcnWesRV1nYfFGXKmA0zW89nprzAVV2LhM=; b=VpPImlFaueaovAjfyfMrx1CaMw3bLbPcjNNlOBGloP6PjYM1ThVUawglyf8ME2q0zK B36HSBKms4A57XtTiJSg8z/rWnZhN886n/X+EVt07D5IK3Z2dcyD8PDVqfvY8kU21Ka1 0s5w+D+kYiOg/ghBszGWnmRKqLmCeo+QmmakIepqlmefpKjomZlyEs/VaBz9su1Ixc+j UH0Y+qP0YA6Opyj7UVrYuP8tWebWH2HCJBDzGG5gwnPmH2iJ5pOyu0KaVO+SFKtWSRMK Nkv6kVpuwTu76zOSHBXskx9RLLd0XAS0Q+PQzSkYWmBK3e7eqUvPq6THE6iSL23uLmub mOuA== MIME-Version: 1.0 Received: by 10.49.14.228 with SMTP id s4mr42022782qec.4.1349699629062; Mon, 08 Oct 2012 05:33:49 -0700 (PDT) Received: by 10.229.146.194 with HTTP; Mon, 8 Oct 2012 05:33:49 -0700 (PDT) Date: Mon, 8 Oct 2012 20:33:49 +0800 Message-ID: Subject: [PATCH] cx88: use list_move_tail instead of list_del/list_add_tail From: Wei Yongjun To: mchehab@infradead.org Cc: yongjun_wei@trendmicro.com.cn, linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Wei Yongjun 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 --- drivers/media/pci/cx88/cx88-mpeg.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/pci/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c index c04fb61..33f6f87 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);