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>
This commit is contained in:
Laurent Pinchart
2019-09-09 13:26:37 +03:00
parent edd60994e8
commit b3cdccbff9
6 changed files with 25 additions and 24 deletions
@@ -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);