From patchwork Thu Aug 23 13:08:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 1367031 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9AFD4DF2AB for ; Thu, 23 Aug 2012 13:09:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758877Ab2HWNJN (ORCPT ); Thu, 23 Aug 2012 09:09:13 -0400 Received: from mail-yx0-f174.google.com ([209.85.213.174]:47914 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758852Ab2HWNJK (ORCPT ); Thu, 23 Aug 2012 09:09:10 -0400 Received: by mail-yx0-f174.google.com with SMTP id l14so168915yen.19 for ; Thu, 23 Aug 2012 06:09:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=H+rBaZrYxGkhZ4RCnkzAnZovvVRsgICFS3vAWrUSNsc=; b=qzp9tnyx6HVStP/Y4eiOznbmujStr7C8ZsPq1e7B8k5+Jb9LrAmZJ3b9uyxPkSwFP2 9dbjrP4nmruCvq5OXQn6PXG85dk2GR/PrFYG2du508iaSmqIISUmtssw9dM6A1uh+PVa TZxRDFEg62+GLdnJhUK4PUh+VVfqM0WZFu/GEHhlvN43uEM/5/Zr4po13VAdbASUcJ9h NsIFiatvAZI+uzTbsrKd1dm9jEv3af30sif4ophd4o4Im1KOXxQPO2KIy1+QAME6n1H6 WuvCxlEtUoLmfv0e8cQdXk+LezrZqchchZVoVPOAMyWxiFyvzVA8dTKkRVAyuCBFWr7Y EI+Q== Received: by 10.236.197.3 with SMTP id s3mr1207765yhn.1.1345727350550; Thu, 23 Aug 2012 06:09:10 -0700 (PDT) Received: from localhost.cpe.express.com.ar ([200.81.126.15]) by mx.google.com with ESMTPS id v5sm6703664anj.16.2012.08.23.06.09.08 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Aug 2012 06:09:09 -0700 (PDT) From: Ezequiel Garcia To: Mauro Carvalho Chehab , Cc: Ezequiel Garcia , Javier Martin Subject: [PATCH 07/10] mem2mem-emmaprp: Remove unneeded struct vb2_queue clear on queue_init() Date: Thu, 23 Aug 2012 10:08:28 -0300 Message-Id: <1345727311-27478-7-git-send-email-elezegarcia@gmail.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1345727311-27478-1-git-send-email-elezegarcia@gmail.com> References: <1345727311-27478-1-git-send-email-elezegarcia@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org queue_init() is always called by v4l2_m2m_ctx_init(), which allocates a context struct v4l2_m2m_ctx with kzalloc. Therefore, there is no need to clear vb2_queue src/dst structs. Cc: Javier Martin Signed-off-by: Ezequiel Garcia Acked-By: Javier Martin --- drivers/media/platform/mx2_emmaprp.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/mx2_emmaprp.c b/drivers/media/platform/mx2_emmaprp.c index dab380a..59aaca4 100644 --- a/drivers/media/platform/mx2_emmaprp.c +++ b/drivers/media/platform/mx2_emmaprp.c @@ -757,7 +757,6 @@ static int queue_init(void *priv, struct vb2_queue *src_vq, struct emmaprp_ctx *ctx = priv; int ret; - memset(src_vq, 0, sizeof(*src_vq)); src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT; src_vq->io_modes = VB2_MMAP | VB2_USERPTR; src_vq->drv_priv = ctx; @@ -769,7 +768,6 @@ static int queue_init(void *priv, struct vb2_queue *src_vq, if (ret) return ret; - memset(dst_vq, 0, sizeof(*dst_vq)); dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; dst_vq->io_modes = VB2_MMAP | VB2_USERPTR; dst_vq->drv_priv = ctx;