From 415ac123997f86ebf6d7994020fd017a6bfa5f27 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 29 Nov 2021 20:14:14 +0200 Subject: libcamera: v4l2_videodevice: Pass FileDescriptor to open() The V4L2VideoDevice::open() function that takes an open file handle duplicates it internally, and leaves the original handle untouched. This is documented but not enforced through language constructs. Fix it by passing a FileDescriptor to the function. Signed-off-by: Laurent Pinchart Reviewed-by: Hirokazu Honda Reviewed-by: Jacopo Mondi --- include/libcamera/internal/v4l2_videodevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h index 80b66577..9f556f99 100644 --- a/include/libcamera/internal/v4l2_videodevice.h +++ b/include/libcamera/internal/v4l2_videodevice.h @@ -184,7 +184,7 @@ public: ~V4L2VideoDevice(); int open(); - int open(int handle, enum v4l2_buf_type type); + int open(FileDescriptor handle, enum v4l2_buf_type type); void close(); const char *driverName() const { return caps_.driver(); } -- cgit v1.2.1