Commit 7c490e25 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: v4l2-ioctl.c: OR flags in v4l_fill_fmtdesc(), not don't overwrite

If a driver sets a FMT flag in the enum_fmt op, then that will be
ignored since v4l_fill_fmtdesc() overwrites it again.

v4l_fill_fmtdesc() should OR its flag, not overwrite it.
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 3ac52d0d
...@@ -1395,7 +1395,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) ...@@ -1395,7 +1395,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
if (descr) if (descr)
WARN_ON(strscpy(fmt->description, descr, sz) < 0); WARN_ON(strscpy(fmt->description, descr, sz) < 0);
fmt->flags = flags; fmt->flags |= flags;
} }
static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops, static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment