]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: ti-vpe: cal: fix enum_mbus_code/frame_size subdev arguments
authorBenoit Parrot <bparrot@ti.com>
Tue, 12 Nov 2019 14:53:46 +0000 (15:53 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 9 Dec 2019 10:40:26 +0000 (11:40 +0100)
Make sure that both enum_mbus_code() and enum_framesize() properly
populate the .which parameter member, otherwise -EINVAL is return
causing the subdev asynchronous registration handshake to fail.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/ti-vpe/cal.c

index 92a54d59d43386613a6a1ee4c951bb7e3e18201e..be54806180a5a377f70c769fb92a329d0af2a44d 100644 (file)
@@ -1493,6 +1493,7 @@ static int cal_enum_framesizes(struct file *file, void *fh,
        fse.index = fsize->index;
        fse.pad = 0;
        fse.code = fmt->code;
+       fse.which = V4L2_SUBDEV_FORMAT_ACTIVE;
 
        ret = v4l2_subdev_call(ctx->sensor, pad, enum_frame_size, NULL, &fse);
        if (ret)
@@ -1833,6 +1834,7 @@ static int cal_async_bound(struct v4l2_async_notifier *notifier,
 
                memset(&mbus_code, 0, sizeof(mbus_code));
                mbus_code.index = j;
+               mbus_code.which = V4L2_SUBDEV_FORMAT_ACTIVE;
                ret = v4l2_subdev_call(subdev, pad, enum_mbus_code,
                                       NULL, &mbus_code);
                if (ret)