From patchwork Thu Aug 23 13:08:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 1367051 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 C1AC63FC66 for ; Thu, 23 Aug 2012 13:09:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758887Ab2HWNJT (ORCPT ); Thu, 23 Aug 2012 09:09:19 -0400 Received: from mail-yw0-f46.google.com ([209.85.213.46]:36090 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758882Ab2HWNJQ (ORCPT ); Thu, 23 Aug 2012 09:09:16 -0400 Received: by mail-yw0-f46.google.com with SMTP id m54so166064yhm.19 for ; Thu, 23 Aug 2012 06:09:16 -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=/QvjZpef+YYIotu/dVoXTT30HIJ11CJZ36DH4RVmf3k=; b=wiQMpsQ89c3HrNptZ17N5JKIhmZJ62FEhHzhR68CPWwqM5qsRIXY2ZPOGMR2RGiMd0 65vCChwdmS1GZFiLKQuEC7yXaKSc4XA01CSRqoF6+uyg3jZGRPlcK2OdJ5cCiPTy9LgW iCpi/16iZ1yTdjuXQdM31WJ4LHKgmTwpv4jmHQ6QiEICYM9PhFDa6sI7JxkRpgjed4WB XHL70iFbUxJKVUslCrF9K8qX0n2xCylIKUU5V97z0zLpsdSbCmdhCnnOhinrYoWPq/54 tq75ZaOXbDQix36CBXIt14okzW6XTN6iPENOYL6XHxtaebldHx0/uJseKBtcNl9VLfGG O9jA== Received: by 10.236.184.9 with SMTP id r9mr1164378yhm.18.1345727356222; Thu, 23 Aug 2012 06:09:16 -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.13 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Aug 2012 06:09:15 -0700 (PDT) From: Ezequiel Garcia To: Mauro Carvalho Chehab , Cc: Ezequiel Garcia , Andrzej Pietrasiewicz Subject: [PATCH 09/10] s5p-jpeg: Remove unneeded struct vb2_queue clear on queue_init() Date: Thu, 23 Aug 2012 10:08:30 -0300 Message-Id: <1345727311-27478-9-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: Andrzej Pietrasiewicz Signed-off-by: Ezequiel Garcia --- drivers/media/platform/s5p-jpeg/jpeg-core.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index 72c3e52..90459cef 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -1223,7 +1223,6 @@ static int queue_init(void *priv, struct vb2_queue *src_vq, struct s5p_jpeg_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; @@ -1235,7 +1234,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;