From patchwork Wed Jun 3 02:13:44 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Figo.zhang" X-Patchwork-Id: 27600 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n532DvkB026717 for ; Wed, 3 Jun 2009 02:13:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752315AbZFCCNx (ORCPT ); Tue, 2 Jun 2009 22:13:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752375AbZFCCNx (ORCPT ); Tue, 2 Jun 2009 22:13:53 -0400 Received: from rv-out-0506.google.com ([209.85.198.228]:18078 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752228AbZFCCNx (ORCPT ); Tue, 2 Jun 2009 22:13:53 -0400 Received: by rv-out-0506.google.com with SMTP id f9so46479rvb.17 for ; Tue, 02 Jun 2009 19:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=0sFKd8gY/P3TD5MvxQQB/d9R88qFLFjrfuflZAxkqRg=; b=bY8gH0d7BOfzI1pMLssi+/FOf5V19LQiXGwfk5hynA1WcXsgmFxHiGHc+yeGGPjCoV L71J2Ail1HD0T3fbSC/lnzV7UN55P0HS0A7Ht66+uS6MWrrQYcx+us+xJDUv5R1rEMec mels9EwQax8k+LMxkOHJBv1SUc3c1ZM7QrcAE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=KakLkM77uH0h92aYxFtpoeVJdAWvRNzzrHqsWiVZZxMi/cIAv7MM8rjuCccURgWbIf ld4MYC2Rf6ETlF4wyMEb50EPnUD9fH85//dBaBjo6laBPgemr6rk6Px6AIuMipQo3PWP BLVOxmaRmnPAFzA8YO9wIT7uYcx/umXhoJYkE= Received: by 10.141.12.15 with SMTP id p15mr477271rvi.43.1243995234228; Tue, 02 Jun 2009 19:13:54 -0700 (PDT) Received: from ?172.16.3.7? ([116.228.155.46]) by mx.google.com with ESMTPS id k41sm21310567rvb.27.2009.06.02.19.13.48 (version=SSLv3 cipher=RC4-MD5); Tue, 02 Jun 2009 19:13:53 -0700 (PDT) Subject: [PATCH] videobuf-dma-sg.c : not need memset() From: "Figo.zhang" To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, Hans Verkuil , Trent Piepho Date: Wed, 03 Jun 2009 10:13:44 +0800 Message-Id: <1243995225.3459.15.camel@myhost> Mime-Version: 1.0 X-Mailer: Evolution 2.26.2 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org mem have malloc zero memory by kzalloc(), so it have not need to memset(). Signed-off-by: Figo.zhang --- drivers/media/video/videobuf-dma-sg.c | 2 +- 1 files changed, 1 insertions(+), 1 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/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c index da1790e..add2f34 100644 --- a/drivers/media/video/videobuf-dma-sg.c +++ b/drivers/media/video/videobuf-dma-sg.c @@ -420,7 +420,7 @@ static void *__videobuf_alloc(size_t size) mem = vb->priv = ((char *)vb)+size; mem->magic=MAGIC_SG_MEM; - videobuf_dma_init(&mem->dma); + mem->dma.magic = MAGIC_DMABUF; dprintk(1,"%s: allocated at %p(%ld+%ld) & %p(%ld)\n", __func__,vb,(long)sizeof(*vb),(long)size-sizeof(*vb),