summaryrefslogtreecommitdiff
path: root/src/android/camera_ops.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/camera_ops.cpp')
-rw-r--r--src/android/camera_ops.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/android/camera_ops.cpp b/src/android/camera_ops.cpp
index 9dfc2e65..ecaac5a3 100644
--- a/src/android/camera_ops.cpp
+++ b/src/android/camera_ops.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * camera_ops.h - Android Camera HAL Operations
+ * Android Camera HAL Operations
*/
#include "camera_ops.h"
@@ -14,7 +14,7 @@
using namespace libcamera;
/*
- * Translatation layer between the Android Camera HAL device operations and the
+ * Translation layer between the Android Camera HAL device operations and the
* CameraDevice.
*/
@@ -61,12 +61,19 @@ static int hal_dev_process_capture_request(const struct camera3_device *dev,
return camera->processCaptureRequest(request);
}
-static void hal_dev_dump(const struct camera3_device *dev, int fd)
+static void hal_dev_dump([[maybe_unused]] const struct camera3_device *dev,
+ [[maybe_unused]] int fd)
{
}
static int hal_dev_flush(const struct camera3_device *dev)
{
+ if (!dev)
+ return -EINVAL;
+
+ CameraDevice *camera = reinterpret_cast<CameraDevice *>(dev->priv);
+ camera->flush();
+
return 0;
}