summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2021-06-10 16:50:22 +0900
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-12-04 23:05:04 +0200
commit91dcd719d7c4aba3cd9942a77d03068c3f05c0a5 (patch)
treebfb9151544639a18e10f4444970c8b9cab59a45d /include
parentc49e888848154741af703596b0e70efdb0e0ec9e (diff)
libcamera: media_device: Manage fd by UniqueFD
Manages a file descriptor owned by MediaDevice for a media device node by UniqueFD. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/media_device.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h
index d636e34a..af0b25b7 100644
--- a/include/libcamera/internal/media_device.h
+++ b/include/libcamera/internal/media_device.h
@@ -16,6 +16,7 @@
#include <libcamera/base/log.h>
#include <libcamera/base/signal.h>
+#include <libcamera/base/unique_fd.h>
#include "libcamera/internal/media_object.h"
@@ -82,7 +83,7 @@ private:
unsigned int version_;
unsigned int hwRevision_;
- int fd_;
+ UniqueFD fd_;
bool valid_;
bool acquired_;
bool lockOwner_;