summaryrefslogtreecommitdiff
path: root/src/v4l2/v4l2_compat_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/v4l2/v4l2_compat_manager.cpp')
-rw-r--r--src/v4l2/v4l2_compat_manager.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp
index 585046e9..ded568be 100644
--- a/src/v4l2/v4l2_compat_manager.cpp
+++ b/src/v4l2/v4l2_compat_manager.cpp
@@ -198,11 +198,7 @@ void *V4L2CompatManager::mmap(void *addr, size_t length, int prot, int flags,
if (map == MAP_FAILED)
return map;
- /*
- * Map to V4L2CameraProxy directly to prevent adding more references
- * to V4L2CameraFile.
- */
- mmaps_[map] = file->proxy();
+ mmaps_[map] = file;
return map;
}
@@ -212,9 +208,9 @@ int V4L2CompatManager::munmap(void *addr, size_t length)
if (device == mmaps_.end())
return fops_.munmap(addr, length);
- V4L2CameraProxy *proxy = device->second;
+ V4L2CameraFile *file = device->second.get();
- int ret = proxy->munmap(addr, length);
+ int ret = file->proxy()->munmap(addr, length);
if (ret < 0)
return ret;