Move dev->subdev_fd to dev->v4l2.subdev_fd

This commit is contained in:
Kamil Trzcinski
2022-04-10 12:01:30 +02:00
parent 645f4a6f33
commit ce439fc1ee
5 changed files with 15 additions and 13 deletions

View File

@@ -111,7 +111,7 @@ int v4l2_device_set_pad_format(device_t *dev, unsigned width, unsigned height, u
{
struct v4l2_subdev_format fmt = {0};
if (dev->subdev_fd < 0) {
if (dev->v4l2.subdev_fd < 0) {
return -1;
}
@@ -123,8 +123,8 @@ int v4l2_device_set_pad_format(device_t *dev, unsigned width, unsigned height, u
fmt.format.colorspace = V4L2_COLORSPACE_RAW;
fmt.format.field = V4L2_FIELD_ANY;
E_LOG_DEBUG(dev, "Configuring mpad %d (subdev_fd=%d)...", fmt.pad, dev->subdev_fd);
E_XIOCTL(dev, dev->subdev_fd, VIDIOC_SUBDEV_S_FMT, &fmt, "Can't configure mpad %d (subdev_fd=%d)", fmt.pad, dev->subdev_fd);
E_LOG_DEBUG(dev, "Configuring mpad %d (subdev_fd=%d)...", fmt.pad, dev->v4l2.subdev_fd);
E_XIOCTL(dev, dev->v4l2.subdev_fd, VIDIOC_SUBDEV_S_FMT, &fmt, "Can't configure mpad %d (subdev_fd=%d)", fmt.pad, dev->v4l2.subdev_fd);
return 0;
error: