From patchwork Sun Jul 4 23:43:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12808 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com 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 A8068C0100 for ; Sun, 4 Jul 2021 23:44:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 291EA68501; Mon, 5 Jul 2021 01:44:31 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="BTtBfvOg"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A9C2260285 for ; Mon, 5 Jul 2021 01:44:29 +0200 (CEST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2CBFFE7 for ; Mon, 5 Jul 2021 01:44:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625442269; bh=Nx0cAEBd9MfONY1tRbijHbMhqgnJwGbETUHNVLVlFpk=; h=From:To:Subject:Date:From; b=BTtBfvOgEMrts8kjIrmqZRYHCeaw5Sg8rtngLiVdobxVQsxzYEGcBsDVM+ExcwyqS ZRb6CleCC8KY/IphoZeDf+JitKG/AezhUdUagMPlGOOMQDfId6lZidWwcCGbV3Ge2B wKWOvL+QYICpYhv6aIjLm1xcZXqPk1i4SJIu3/Pk= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 5 Jul 2021 02:43:44 +0300 Message-Id: <20210704234344.10765-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: media_device: Rename valid() function to isValid() 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" We use isValid() instead of valid() through the code base, make MediaDevice consistent. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Umang Jain --- include/libcamera/internal/media_device.h | 2 +- src/libcamera/media_device.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h index 8424611d7eda..3a7722c2a215 100644 --- a/include/libcamera/internal/media_device.h +++ b/include/libcamera/internal/media_device.h @@ -35,7 +35,7 @@ public: void unlock(); int populate(); - bool valid() const { return valid_; } + bool isValid() const { return valid_; } const std::string driver() const { return driver_; } const std::string deviceNode() const { return deviceNode_; } diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp index e12ab1abb10d..fa50264fa253 100644 --- a/src/libcamera/media_device.cpp +++ b/src/libcamera/media_device.cpp @@ -44,7 +44,7 @@ LOG_DEFINE_CATEGORY(MediaDevice) * MediaEntity, MediaPad and MediaLink are created to model the media graph, * and stored in a map indexed by object id. * - * The graph is valid once successfully populated, as reported by the valid() + * The graph is valid once successfully populated, as reported by the isValid() * function. It can be queried to list all entities(), or entities can be * looked up by name with getEntityByName(). The graph can be traversed from * entity to entity through pads and links as exposed by the corresponding @@ -292,7 +292,7 @@ done: } /** - * \fn MediaDevice::valid() + * \fn MediaDevice::isValid() * \brief Query whether the media graph has been populated and is valid * \return true if the media graph is valid, false otherwise */ @@ -571,7 +571,7 @@ bool MediaDevice::addObject(MediaObject *object) * * The media device graph state is reset to invalid when the graph is cleared. * - * \sa valid() + * \sa isValid() */ void MediaDevice::clear() {