From patchwork Tue Nov 16 20:24:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: achew@nvidia.com X-Patchwork-Id: 329181 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAGKS3UI022523 for ; Tue, 16 Nov 2010 20:28:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754225Ab0KPU1d (ORCPT ); Tue, 16 Nov 2010 15:27:33 -0500 Received: from hqemgate04.nvidia.com ([216.228.121.35]:6771 "EHLO hqemgate04.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751444Ab0KPU1c (ORCPT ); Tue, 16 Nov 2010 15:27:32 -0500 Received: from hqnvupgp04.nvidia.com (Not Verified[172.20.161.15]) by hqemgate04.nvidia.com id ; Tue, 16 Nov 2010 12:25:06 -0800 Received: from hqemfe02.nvidia.com ([172.17.108.22]) by hqnvupgp04.nvidia.com (PGP Universal service); Tue, 16 Nov 2010 12:27:32 -0800 X-PGP-Universal: processed; by hqnvupgp04.nvidia.com on Tue, 16 Nov 2010 12:27:32 -0800 Received: from localhost.localdomain ([172.20.144.16]) by hqemfe02.nvidia.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 16 Nov 2010 12:27:27 -0800 From: achew@nvidia.com To: zhangtianfei@leadcoretech.com, hverkuil@xs4all.nl, pawel@osciak.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Chew Subject: [PATCH 1/1] videobuf: Initialize lists in videobuf_buffer. Date: Tue, 16 Nov 2010 12:24:43 -0800 Message-Id: <1289939083-27209-1-git-send-email-achew@nvidia.com> X-Mailer: git-send-email 1.7.0.4 X-OriginalArrivalTime: 16 Nov 2010 20:27:27.0948 (UTC) FILETIME=[AFCD48C0:01CB85CC] Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 16 Nov 2010 20:28:03 +0000 (UTC) diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c index c969111..f7e0f86 100644 --- a/drivers/media/video/videobuf-dma-contig.c +++ b/drivers/media/video/videobuf-dma-contig.c @@ -193,6 +193,8 @@ static struct videobuf_buffer *__videobuf_alloc_vb(size_t size) if (vb) { mem = vb->priv = ((char *)vb) + size; mem->magic = MAGIC_DC_MEM; + INIT_LIST_HEAD(&vb->stream); + INIT_LIST_HEAD(&vb->queue); } return vb; diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c index 20f227e..5af3217 100644 --- a/drivers/media/video/videobuf-dma-sg.c +++ b/drivers/media/video/videobuf-dma-sg.c @@ -430,6 +430,8 @@ static struct videobuf_buffer *__videobuf_alloc_vb(size_t size) mem = vb->priv = ((char *)vb) + size; mem->magic = MAGIC_SG_MEM; + INIT_LIST_HEAD(&vb->stream); + INIT_LIST_HEAD(&vb->queue); videobuf_dma_init(&mem->dma); diff --git a/drivers/media/video/videobuf-vmalloc.c b/drivers/media/video/videobuf-vmalloc.c index df14258..8babedd 100644 --- a/drivers/media/video/videobuf-vmalloc.c +++ b/drivers/media/video/videobuf-vmalloc.c @@ -146,6 +146,8 @@ static struct videobuf_buffer *__videobuf_alloc_vb(size_t size) mem = vb->priv = ((char *)vb) + size; mem->magic = MAGIC_VMAL_MEM; + INIT_LIST_HEAD(&vb->stream); + INIT_LIST_HEAD(&vb->queue); dprintk(1, "%s: allocated at %p(%ld+%ld) & %p(%ld)\n", __func__, vb, (long)sizeof(*vb), (long)size - sizeof(*vb),