summaryrefslogtreecommitdiff
path: root/src/libcamera/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-09-09 13:26:37 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-09-13 20:13:16 +0300
commitb3cdccbff9fb8e4da6eab06f2fe3e1f02aa29939 (patch)
tree32aa51f3254ccf6c43a73fefaa92df4a2866e9f1 /src/libcamera/include
parentedd60994e813723c8e4fb362ce1d5f5a4675a565 (diff)
libcamera: device_enumerator: Move lookupDeviceNode() to child classes
The lookupDeviceNode() method is declared as pure virtual in the base DeviceEnumerator class, but is only called by derived classes. Move it to the DeviceEnumeratorSysfs and DeviceEnumeratorUdev. This allows changing the udev version to take a dev_t instead of separate major/minor, as that's what both the caller and the callee end up using. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/libcamera/include')
-rw-r--r--src/libcamera/include/device_enumerator.h2
-rw-r--r--src/libcamera/include/device_enumerator_sysfs.h2
-rw-r--r--src/libcamera/include/device_enumerator_udev.h2
3 files changed, 2 insertions, 4 deletions
diff --git a/src/libcamera/include/device_enumerator.h b/src/libcamera/include/device_enumerator.h
index c5d26f1a..770f4277 100644
--- a/src/libcamera/include/device_enumerator.h
+++ b/src/libcamera/include/device_enumerator.h
@@ -50,8 +50,6 @@ protected:
private:
std::vector<std::shared_ptr<MediaDevice>> devices_;
-
- virtual std::string lookupDeviceNode(int major, int minor) = 0;
};
} /* namespace libcamera */
diff --git a/src/libcamera/include/device_enumerator_sysfs.h b/src/libcamera/include/device_enumerator_sysfs.h
index 242b22b2..9063f6a7 100644
--- a/src/libcamera/include/device_enumerator_sysfs.h
+++ b/src/libcamera/include/device_enumerator_sysfs.h
@@ -24,7 +24,7 @@ public:
private:
int populateMediaDevice(const std::shared_ptr<MediaDevice> &media);
- std::string lookupDeviceNode(int major, int minor) final;
+ std::string lookupDeviceNode(int major, int minor);
};
} /* namespace libcamera */
diff --git a/src/libcamera/include/device_enumerator_udev.h b/src/libcamera/include/device_enumerator_udev.h
index 5bdcdea6..fb7cac80 100644
--- a/src/libcamera/include/device_enumerator_udev.h
+++ b/src/libcamera/include/device_enumerator_udev.h
@@ -47,7 +47,7 @@ private:
int addUdevDevice(struct udev_device *dev);
int populateMediaDevice(const std::shared_ptr<MediaDevice> &media);
- std::string lookupDeviceNode(int major, int minor) final;
+ std::string lookupDeviceNode(dev_t devnum);
int addV4L2Device(dev_t devnum);
void udevNotify(EventNotifier *notifier);