[libcamera-devel,v2,2/2] libcamera: pipeline_handler: Remove Camera pointer from CameraData
diff mbox series

Message ID 20201221235345.1965878-3-niklas.soderlund@ragnatech.se
State Accepted
Commit 6ef7eddfd4833095d5ad93e523c414fab66aff90
Delegated to: Niklas Söderlund
Headers show
Series
  • libcamera: pipeline_handler: Remove Camera pointer from Request handling
Related show

Commit Message

Niklas Söderlund Dec. 21, 2020, 11:53 p.m. UTC
There are no users left of this field, drop it.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 include/libcamera/internal/pipeline_handler.h |  1 -
 src/libcamera/pipeline_handler.cpp            | 11 -----------
 2 files changed, 12 deletions(-)

Comments

Laurent Pinchart Dec. 22, 2020, 7:55 a.m. UTC | #1
Hi Niklas,

Thank you for the patch.

On Tue, Dec 22, 2020 at 12:53:45AM +0100, Niklas Söderlund wrote:
> There are no users left of this field, drop it.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  include/libcamera/internal/pipeline_handler.h |  1 -
>  src/libcamera/pipeline_handler.cpp            | 11 -----------
>  2 files changed, 12 deletions(-)
> 
> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
> index 5f9a26be1f7a9e9e..0748f86346084e2d 100644
> --- a/include/libcamera/internal/pipeline_handler.h
> +++ b/include/libcamera/internal/pipeline_handler.h
> @@ -42,7 +42,6 @@ public:
>  	}
>  	virtual ~CameraData() = default;
>  
> -	Camera *camera_;
>  	PipelineHandler *pipe_;
>  	std::list<Request *> queuedRequests_;
>  	ControlInfoMap controlInfo_;
> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
> index 26d6c07d2d6e69e9..c2604d4561124186 100644
> --- a/src/libcamera/pipeline_handler.cpp
> +++ b/src/libcamera/pipeline_handler.cpp
> @@ -60,16 +60,6 @@ LOG_DEFINE_CATEGORY(Pipeline)
>   * exists.
>   */
>  
> -/**
> - * \var CameraData::camera_
> - * \brief The camera related to this CameraData instance
> - *
> - * The camera_ pointer provides access to the Camera object that this instance
> - * is related to. It is set when the Camera is registered with
> - * PipelineHandler::registerCamera() and remains valid until the CameraData
> - * instance is destroyed.
> - */
> -
>  /**
>   * \var CameraData::pipe_
>   * \brief The pipeline handler related to this CameraData instance
> @@ -493,7 +483,6 @@ void PipelineHandler::completeRequest(Request *request)
>  void PipelineHandler::registerCamera(std::shared_ptr<Camera> camera,
>  				     std::unique_ptr<CameraData> data)
>  {
> -	data->camera_ = camera.get();
>  	cameraData_[camera.get()] = std::move(data);
>  	cameras_.push_back(camera);
>
Jacopo Mondi Dec. 22, 2020, 11:21 a.m. UTC | #2
Hi Niklas,

On Tue, Dec 22, 2020 at 12:53:45AM +0100, Niklas Söderlund wrote:
> There are no users left of this field, drop it.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
  j

> ---
>  include/libcamera/internal/pipeline_handler.h |  1 -
>  src/libcamera/pipeline_handler.cpp            | 11 -----------
>  2 files changed, 12 deletions(-)
>
> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
> index 5f9a26be1f7a9e9e..0748f86346084e2d 100644
> --- a/include/libcamera/internal/pipeline_handler.h
> +++ b/include/libcamera/internal/pipeline_handler.h
> @@ -42,7 +42,6 @@ public:
>  	}
>  	virtual ~CameraData() = default;
>
> -	Camera *camera_;
>  	PipelineHandler *pipe_;
>  	std::list<Request *> queuedRequests_;
>  	ControlInfoMap controlInfo_;
> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
> index 26d6c07d2d6e69e9..c2604d4561124186 100644
> --- a/src/libcamera/pipeline_handler.cpp
> +++ b/src/libcamera/pipeline_handler.cpp
> @@ -60,16 +60,6 @@ LOG_DEFINE_CATEGORY(Pipeline)
>   * exists.
>   */
>
> -/**
> - * \var CameraData::camera_
> - * \brief The camera related to this CameraData instance
> - *
> - * The camera_ pointer provides access to the Camera object that this instance
> - * is related to. It is set when the Camera is registered with
> - * PipelineHandler::registerCamera() and remains valid until the CameraData
> - * instance is destroyed.
> - */
> -
>  /**
>   * \var CameraData::pipe_
>   * \brief The pipeline handler related to this CameraData instance
> @@ -493,7 +483,6 @@ void PipelineHandler::completeRequest(Request *request)
>  void PipelineHandler::registerCamera(std::shared_ptr<Camera> camera,
>  				     std::unique_ptr<CameraData> data)
>  {
> -	data->camera_ = camera.get();
>  	cameraData_[camera.get()] = std::move(data);
>  	cameras_.push_back(camera);
>
> --
> 2.29.2
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch
diff mbox series

diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
index 5f9a26be1f7a9e9e..0748f86346084e2d 100644
--- a/include/libcamera/internal/pipeline_handler.h
+++ b/include/libcamera/internal/pipeline_handler.h
@@ -42,7 +42,6 @@  public:
 	}
 	virtual ~CameraData() = default;
 
-	Camera *camera_;
 	PipelineHandler *pipe_;
 	std::list<Request *> queuedRequests_;
 	ControlInfoMap controlInfo_;
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index 26d6c07d2d6e69e9..c2604d4561124186 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -60,16 +60,6 @@  LOG_DEFINE_CATEGORY(Pipeline)
  * exists.
  */
 
-/**
- * \var CameraData::camera_
- * \brief The camera related to this CameraData instance
- *
- * The camera_ pointer provides access to the Camera object that this instance
- * is related to. It is set when the Camera is registered with
- * PipelineHandler::registerCamera() and remains valid until the CameraData
- * instance is destroyed.
- */
-
 /**
  * \var CameraData::pipe_
  * \brief The pipeline handler related to this CameraData instance
@@ -493,7 +483,6 @@  void PipelineHandler::completeRequest(Request *request)
 void PipelineHandler::registerCamera(std::shared_ptr<Camera> camera,
 				     std::unique_ptr<CameraData> data)
 {
-	data->camera_ = camera.get();
 	cameraData_[camera.get()] = std::move(data);
 	cameras_.push_back(camera);