libcamera: v4l2_device: Make fd() function const
There are use cases for getting the file descriptor of a const V4L2Device instance, for instance to print it in a log. Make the function const. There's little risk of abuse here (as in code then performing operations on the file descriptors that conceptually modify the V4L2 device), as the fd() function is protected. 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:
parent
a52eebed20
commit
f2067dffed
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ protected:
|
||||||
|
|
||||||
int ioctl(unsigned long request, void *argp);
|
int ioctl(unsigned long request, void *argp);
|
||||||
|
|
||||||
int fd() { return fd_; }
|
int fd() const { return fd_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void listControls();
|
void listControls();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue