[libcamera-devel,11/14] android: camera_hal_manager: Remove unused close() method

Message ID 20190818011329.14499-12-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • Assorted fixes for Android camera HAL
Related show

Commit Message

Laurent Pinchart Aug. 18, 2019, 1:13 a.m. UTC
The CameraHalManager::close() method isn't used, remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/android/camera_hal_manager.cpp | 10 +---------
 src/android/camera_hal_manager.h   |  1 -
 2 files changed, 1 insertion(+), 10 deletions(-)

Comments

Jacopo Mondi Aug. 19, 2019, 9:18 a.m. UTC | #1
On Sun, Aug 18, 2019 at 04:13:26AM +0300, Laurent Pinchart wrote:
> The CameraHalManager::close() method isn't used, remove it.
>

Indeed a leftover now that the camera stack calls proxy->close()
directly

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

Thanks
  j

> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  src/android/camera_hal_manager.cpp | 10 +---------
>  src/android/camera_hal_manager.h   |  1 -
>  2 files changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp
> index 063080a0746b..a1ffb3713d7e 100644
> --- a/src/android/camera_hal_manager.cpp
> +++ b/src/android/camera_hal_manager.cpp
> @@ -25,7 +25,7 @@ LOG_DECLARE_CATEGORY(HAL);
>   * and spawns its own thread where libcamera related events are dispatched to.
>   * It wraps the libcamera CameraManager operations and provides helpers for the
>   * camera_module_t operations, to retrieve the number of cameras in the system,
> - * their static information and to open and close camera devices.
> + * their static information and to open camera devices.
>   */
>
>  CameraHalManager::~CameraHalManager()
> @@ -109,14 +109,6 @@ CameraProxy *CameraHalManager::open(unsigned int id,
>  	return proxy;
>  }
>
> -int CameraHalManager::close(CameraProxy *proxy)
> -{
> -	proxy->close();
> -	LOG(HAL, Info) << "Close camera '" << proxy->id() << "'";
> -
> -	return 0;
> -}
> -
>  unsigned int CameraHalManager::numCameras() const
>  {
>  	return cameraManager_->cameras().size();
> diff --git a/src/android/camera_hal_manager.h b/src/android/camera_hal_manager.h
> index 502115cf056f..c23abd1c00af 100644
> --- a/src/android/camera_hal_manager.h
> +++ b/src/android/camera_hal_manager.h
> @@ -29,7 +29,6 @@ public:
>  	int init();
>
>  	CameraProxy *open(unsigned int id, const hw_module_t *module);
> -	int close(CameraProxy *proxy);
>
>  	unsigned int numCameras() const;
>  	int getCameraInfo(unsigned int id, struct camera_info *info);
> --
> Regards,
>
> Laurent Pinchart
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp
index 063080a0746b..a1ffb3713d7e 100644
--- a/src/android/camera_hal_manager.cpp
+++ b/src/android/camera_hal_manager.cpp
@@ -25,7 +25,7 @@  LOG_DECLARE_CATEGORY(HAL);
  * and spawns its own thread where libcamera related events are dispatched to.
  * It wraps the libcamera CameraManager operations and provides helpers for the
  * camera_module_t operations, to retrieve the number of cameras in the system,
- * their static information and to open and close camera devices.
+ * their static information and to open camera devices.
  */
 
 CameraHalManager::~CameraHalManager()
@@ -109,14 +109,6 @@  CameraProxy *CameraHalManager::open(unsigned int id,
 	return proxy;
 }
 
-int CameraHalManager::close(CameraProxy *proxy)
-{
-	proxy->close();
-	LOG(HAL, Info) << "Close camera '" << proxy->id() << "'";
-
-	return 0;
-}
-
 unsigned int CameraHalManager::numCameras() const
 {
 	return cameraManager_->cameras().size();
diff --git a/src/android/camera_hal_manager.h b/src/android/camera_hal_manager.h
index 502115cf056f..c23abd1c00af 100644
--- a/src/android/camera_hal_manager.h
+++ b/src/android/camera_hal_manager.h
@@ -29,7 +29,6 @@  public:
 	int init();
 
 	CameraProxy *open(unsigned int id, const hw_module_t *module);
-	int close(CameraProxy *proxy);
 
 	unsigned int numCameras() const;
 	int getCameraInfo(unsigned int id, struct camera_info *info);