summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/pipeline/uvcvideo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp
index fcc1c011..ce38445d 100644
--- a/src/libcamera/pipeline/uvcvideo.cpp
+++ b/src/libcamera/pipeline/uvcvideo.cpp
@@ -7,6 +7,7 @@
#include <algorithm>
#include <iomanip>
+#include <sys/sysmacros.h>
#include <tuple>
#include <libcamera/camera.h>
@@ -309,10 +310,12 @@ bool PipelineHandlerUVC::match(DeviceEnumerator *enumerator)
if (data->init(*entity))
return false;
+ dev_t devnum = makedev((*entity)->deviceMajor(), (*entity)->deviceMinor());
+
/* Create and register the camera. */
std::set<Stream *> streams{ &data->stream_ };
std::shared_ptr<Camera> camera = Camera::create(this, media->model(), streams);
- registerCamera(std::move(camera), std::move(data));
+ registerCamera(std::move(camera), std::move(data), devnum);
/* Enable hot-unplug notifications. */
hotplugMediaDevice(media);