diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2015-06-15 08:33:32 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-08-11 09:50:01 -0300 |
commit | 517ef25521ad7fd61ec411871525ebc28b2170a6 (patch) | |
tree | 79cc36287953a42a672bb66b219914fb913b94bd /drivers/media | |
parent | 1f3375e0b257d086efe2b7d3d705e47c3e4a6c2d (diff) |
[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: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/i2c/ak881x.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/i2c/ak881x.c b/drivers/media/i2c/ak881x.c index 29846245aa3b..d3b965ec3bbc 100644 --- a/drivers/media/i2c/ak881x.c +++ b/drivers/media/i2c/ak881x.c @@ -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) { vp1 = 7; ak881x->lines = 480; - } else if (std && !(std & ~V4L2_STD_PAL)) { - vp1 = 0xf; - ak881x->lines = 576; - } else if (std && !(std & ~V4L2_STD_NTSC)) { + } else if (std & V4L2_STD_NTSC) { vp1 = 0; ak881x->lines = 480; + } else if (std & V4L2_STD_PAL) { + vp1 = 0xf; + ak881x->lines = 576; } else { /* No SECAM or PAL_N/Nc supported */ return -EINVAL; |