[libcamera-devel] [PATCH] libcamera: v4l2_subdevice: Fix S_SELECTION ioctl argument

Jacopo Mondi jacopo at jmondi.org
Mon Feb 18 18:30:38 CET 2019


The SUBDEV_S_SELECTION argument needs to be a pointer. Fix it.

Fixes: 468176fa07d9 ("libcamera: Add V4L2Subdevice")
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
 src/libcamera/v4l2_subdevice.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
index 17f715fe707a..b436f73cc75f 100644
--- a/src/libcamera/v4l2_subdevice.cpp
+++ b/src/libcamera/v4l2_subdevice.cpp
@@ -250,7 +250,7 @@ int V4L2Subdevice::setSelection(unsigned int pad, unsigned int target,
 	sel.r.width = rect->w;
 	sel.r.height = rect->h;

-	int ret = ioctl(fd_, VIDIOC_SUBDEV_S_SELECTION, sel);
+	int ret = ioctl(fd_, VIDIOC_SUBDEV_S_SELECTION, &sel);
 	if (ret < 0) {
 		ret = -errno;
 		LOG(V4L2Subdev, Error)
--
2.20.1



More information about the libcamera-devel mailing list