summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
diff options
context:
space:
mode:
authorXia Jiang <xia.jiang@mediatek.com>2020-08-14 09:11:34 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-08-28 15:17:30 +0200
commit8ea373774ac6d4f08df09b62c700c15dafb25458 (patch)
treed9bcc56f27dcf6c03d30b648acb1a9ed98e762a0 /drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
parentcc9d3fa2d599675a940be5fdbf46f01d6d236a24 (diff)
downloadlinux-8ea373774ac6d4f08df09b62c700c15dafb25458.tar.bz2
media: platform: Improve subscribe event flow for bug fixing
Let v4l2_ctrl_subscribe_event() do the job for other types except V4L2_EVENT_SOURCE_CHANGE. Reviewed-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Xia Jiang <xia.jiang@mediatek.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c')
-rw-r--r--drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
index 61fed1e35a00..d1b13556e18b 100644
--- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
+++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
@@ -446,9 +446,9 @@ static int mtk_jpeg_subscribe_event(struct v4l2_fh *fh,
switch (sub->type) {
case V4L2_EVENT_SOURCE_CHANGE:
return v4l2_src_change_event_subscribe(fh, sub);
- default:
- return -EINVAL;
}
+
+ return v4l2_ctrl_subscribe_event(fh, sub);
}
static int mtk_jpeg_g_selection(struct file *file, void *priv,