From patchwork Sat Jun 27 03:00:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 8448 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id E3D88C2E67 for ; Sat, 27 Jun 2020 03:00:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A34AE60B09; Sat, 27 Jun 2020 05:00:58 +0200 (CEST) Received: from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net [195.74.38.227]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 060F260A16 for ; Sat, 27 Jun 2020 05:00:54 +0200 (CEST) X-Halon-ID: 56ea8c4c-b822-11ea-86ee-0050569116f7 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (p4fca2eca.dip0.t-ipconnect.de [79.202.46.202]) by bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA id 56ea8c4c-b822-11ea-86ee-0050569116f7; Sat, 27 Jun 2020 05:00:21 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Sat, 27 Jun 2020 05:00:36 +0200 Message-Id: <20200627030043.2088585-7-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200627030043.2088585-1-niklas.soderlund@ragnatech.se> References: <20200627030043.2088585-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 06/13] libcamera: ipu3: imgu: Do not cache index X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The numerical index of the imgu is only used to create its name in string form. There is no need to keep it around after that, remove it. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/ipu3/imgu.cpp | 3 +-- src/libcamera/pipeline/ipu3/imgu.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp index 26a95979d0c7735a..5d11539605f26303 100644 --- a/src/libcamera/pipeline/ipu3/imgu.cpp +++ b/src/libcamera/pipeline/ipu3/imgu.cpp @@ -37,8 +37,7 @@ int ImgUDevice::init(MediaDevice *media, unsigned int index) { int ret; - index_ = index; - name_ = "ipu3-imgu " + std::to_string(index_); + name_ = "ipu3-imgu " + std::to_string(index); media_ = media; /* diff --git a/src/libcamera/pipeline/ipu3/imgu.h b/src/libcamera/pipeline/ipu3/imgu.h index 9bb1b88e2ca8ea2d..ad5aabf134e2099d 100644 --- a/src/libcamera/pipeline/ipu3/imgu.h +++ b/src/libcamera/pipeline/ipu3/imgu.h @@ -69,7 +69,6 @@ public: bool enable); int enableLinks(bool enable); - unsigned int index_; std::string name_; MediaDevice *media_;