Commit 517ef255 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] ak881x: simplify standard checks

Simplify confusing conditions. This also swaps the checks for NTSC and PAL:
to be consistent with other drivers check for NTSC first. So if the user
sets both NTSC and PAL bits, then NTSC wins.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 1f3375e0
...@@ -156,12 +156,12 @@ static int ak881x_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std) ...@@ -156,12 +156,12 @@ static int ak881x_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
} else if (std == V4L2_STD_PAL_60) { } else if (std == V4L2_STD_PAL_60) {
vp1 = 7; vp1 = 7;
ak881x->lines = 480; ak881x->lines = 480;
} else if (std && !(std & ~V4L2_STD_PAL)) { } else if (std & V4L2_STD_NTSC) {
vp1 = 0xf;
ak881x->lines = 576;
} else if (std && !(std & ~V4L2_STD_NTSC)) {
vp1 = 0; vp1 = 0;
ak881x->lines = 480; ak881x->lines = 480;
} else if (std & V4L2_STD_PAL) {
vp1 = 0xf;
ak881x->lines = 576;
} else { } else {
/* No SECAM or PAL_N/Nc supported */ /* No SECAM or PAL_N/Nc supported */
return -EINVAL; return -EINVAL;
......
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