From patchwork Tue Oct 10 02:46:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenyou.Yang@microchip.com X-Patchwork-Id: 9995001 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9998A601AE for ; Tue, 10 Oct 2017 04:05:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F9EF26538 for ; Tue, 10 Oct 2017 04:05:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61D6D26785; Tue, 10 Oct 2017 04:05:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D757926538 for ; Tue, 10 Oct 2017 04:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yBg77glPvFpDToXrYnqOn2Vovpm/m8oEc5LMGYd57wA=; b=oSptmWqrnHUMRk 7WcpcLW/N7C0m3E2IU0DooDBBzhSk9dEhPTqvhRC+kR2jFN7HPQEmh4g7eFgkRRzTB+eUp7+Nlngq j//BLtlOdgTSz93QuQUKcpj6E85Lx37/OKgTkIG8ASgv+p8sW+vwNKvkvIe4DNBuV7vpQoRfXZqky klI3E7ld61E7zpqcqX6yquB3eSZgpbTGD5gWs0kfcPrfO5hljRDGMZKoOUpYxa6TeFWFa6ZgDVTN5 n3zhsnkTlHanPB6yu1vUfyZeervLG5SyNGcp4S+UMarpN9a+nFSx0wVodltqiL/Yui/TtXXL8FyJB as0IrLRogy5pkM9Gcqgw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e1lnn-0003ty-4A; Tue, 10 Oct 2017 04:05:55 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e1lb9-0005SZ-RQ for linux-arm-kernel@bombadil.infradead.org; Tue, 10 Oct 2017 03:52:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Jx2qGzaydLwcklOmvuHFH7nMPG2W96FSjkueZdK7w7s=; b=fDHnJMwI4MoGB0lHv7q+EyXTN WRxnvEwsUDcpRyzxP7qxThc9UnovTWB9OKmaZlvhRttoAgZZv641QOBYZsEB2vOqGNmZzuuUHt5yd YbPXO2tzGby3cyb/nLEbmUoJave7bb5j8F+0oH0TSy/YQ+9GO2BqYxRYgvPM/9wIrCm+Z8BIc1plf 1rZkD2lLo+arbIYKjG7rBpeHQhSy3g0VvqpaylFN8b3ABrcp+ygN8nLbeQqyMKfx5biO/GJkAdGbO CnNUmhk3JRtErbETIWakYFP0zCmdGLU44YUlRNHWsexgZwK+jFbT1eGhjyOBAGX8WQVuU0fQi2zl8 b+rB/2iyw==; Received: from eusmtp01.atmel.com ([212.144.249.243]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e1kdu-0006gD-1B for linux-arm-kernel@lists.infradead.org; Tue, 10 Oct 2017 02:51:41 +0000 Received: from apsmtp01.atmel.com (10.168.254.30) by eusmtp01.atmel.com (10.145.145.31) with Microsoft SMTP Server id 14.3.235.1; Tue, 10 Oct 2017 04:51:12 +0200 Received: from shaarm01.corp.atmel.com (10.168.254.13) by apsmtp01.corp.atmel.com (10.168.254.30) with Microsoft SMTP Server id 14.3.235.1; Tue, 10 Oct 2017 10:55:55 +0800 From: Wenyou Yang To: Mauro Carvalho Chehab Subject: [PATCH v4 4/5] media: atmel-isc: Remove unnecessary member Date: Tue, 10 Oct 2017 10:46:39 +0800 Message-ID: <20171010024640.5733-5-wenyou.yang@microchip.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20171010024640.5733-1-wenyou.yang@microchip.com> References: <20171010024640.5733-1-wenyou.yang@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171010_035138_120065_84D0FAAA X-CRM114-Status: GOOD ( 12.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wenyou Yang , Jonathan Corbet , linux-kernel@vger.kernel.org, Hans Verkuil , Sakari Ailus , linux-arm-kernel@lists.infradead.org, Linux Media Mailing List Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Remove the memeber *config from the isc_subdev_entity struct, the member is useless afterward. Signed-off-by: Wenyou Yang --- Changes in v4: None Changes in v3: None Changes in v2: None drivers/media/platform/atmel/atmel-isc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c index a44a66ad2c02..29780fcdfc8b 100644 --- a/drivers/media/platform/atmel/atmel-isc.c +++ b/drivers/media/platform/atmel/atmel-isc.c @@ -83,7 +83,6 @@ struct isc_subdev_entity { struct v4l2_subdev *sd; struct v4l2_async_subdev *asd; struct v4l2_async_notifier notifier; - struct v4l2_subdev_pad_config *config; u32 pfe_cfg0; @@ -1000,6 +999,7 @@ static int isc_try_fmt(struct isc_device *isc, struct v4l2_format *f, { struct isc_format *isc_fmt; struct v4l2_pix_format *pixfmt = &f->fmt.pix; + struct v4l2_subdev_pad_config pad_cfg; struct v4l2_subdev_format format = { .which = V4L2_SUBDEV_FORMAT_TRY, }; @@ -1030,7 +1030,7 @@ static int isc_try_fmt(struct isc_device *isc, struct v4l2_format *f, v4l2_fill_mbus_format(&format.format, pixfmt, mbus_code); ret = v4l2_subdev_call(isc->current_subdev->sd, pad, set_fmt, - isc->current_subdev->config, &format); + &pad_cfg, &format); if (ret < 0) return ret; @@ -1495,8 +1495,6 @@ static void isc_async_unbind(struct v4l2_async_notifier *notifier, struct isc_device, v4l2_dev); cancel_work_sync(&isc->awb_work); video_unregister_device(&isc->video_dev); - if (isc->current_subdev->config) - v4l2_subdev_free_pad_config(isc->current_subdev->config); v4l2_ctrl_handler_free(&isc->ctrls.handler); } @@ -1648,10 +1646,6 @@ static int isc_async_complete(struct v4l2_async_notifier *notifier) INIT_LIST_HEAD(&isc->dma_queue); spin_lock_init(&isc->dma_queue_lock); - sd_entity->config = v4l2_subdev_alloc_pad_config(sd_entity->sd); - if (!sd_entity->config) - return -ENOMEM; - ret = isc_formats_init(isc); if (ret < 0) { v4l2_err(&isc->v4l2_dev,