aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/i2c/ml86v7667.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-05-31 05:15:17 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-13 11:38:50 -0300
commitd13ac96f576ef23670d9e65f8f3771b17fd6dce1 (patch)
treefea9b29ed2f6cbf34c4e17561922f04c85167ae5 /drivers/media/i2c/ml86v7667.c
parented3e12d2b03f756f09433f08c4606cdc61ffbc7c (diff)
[media] ml86v7667: fix the querystd implementation
The *std should be set to V4L2_STD_UNKNOWN, not the function's return code. Also, *std should be ANDed with 525_60 or 625_50. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c/ml86v7667.c')
-rw-r--r--drivers/media/i2c/ml86v7667.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/i2c/ml86v7667.c b/drivers/media/i2c/ml86v7667.c
index 0f256d3cc62b..cd9f86e743b2 100644
--- a/drivers/media/i2c/ml86v7667.c
+++ b/drivers/media/i2c/ml86v7667.c
@@ -169,10 +169,10 @@ static int ml86v7667_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
if (status < 0)
return status;
- if (!(status & STATUS_HLOCK_DETECT))
- return V4L2_STD_UNKNOWN;
-
- *std = status & STATUS_NTSCPAL ? V4L2_STD_625_50 : V4L2_STD_525_60;
+ if (status & STATUS_HLOCK_DETECT)
+ *std &= status & STATUS_NTSCPAL ? V4L2_STD_625_50 : V4L2_STD_525_60;
+ else
+ *std = V4L2_STD_UNKNOWN;
return 0;
}