From 5c85ef58833ee9866a3280d0dac6b285bc9ab6ad Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Wed, 16 Jan 2019 11:59:56 +0100 Subject: libcamera: media_object: Set devnode in MediaEntity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The MediaEntity::setDeviceNode() function was designed to set the device node path associated with a MediaEntity. The function was there, but the devnode_ member field was never actually set. Fix this. While at there add a getter method for the devnode_ member as it will soon be used. Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Signed-off-by: Jacopo Mondi --- src/libcamera/media_object.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/libcamera/media_object.cpp') diff --git a/src/libcamera/media_object.cpp b/src/libcamera/media_object.cpp index 530db71d..7d075384 100644 --- a/src/libcamera/media_object.cpp +++ b/src/libcamera/media_object.cpp @@ -263,6 +263,15 @@ void MediaPad::addLink(MediaLink *link) * \return The entity's function */ +/** + * \fn MediaEntity::devnode() + * \brief Retrieve the entity's device node path, if any + * + * \sa int setDeviceNode() + * + * \return The entity's device node path, or an empty string if it is not set + */ + /** * \fn MediaEntity::deviceMajor() * \brief Retrieve the major number of the interface associated with the entity @@ -330,6 +339,8 @@ int MediaEntity::setDeviceNode(const std::string &devnode) return ret; } + devnode_ = devnode; + return 0; } -- cgit v1.2.1