diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-05-29 10:18:57 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-17 09:42:56 -0300 |
commit | 416e87a41d8430b8dc0f1e94f925b6deb71debbc (patch) | |
tree | 34248d397b4b76de33806b64d02a99d0779c7c87 /drivers/media/i2c | |
parent | e83c30c723caf5def0eb8eca5b106b39a3dab71c (diff) |
[media] saa7110: fix querystd
Return V4L2_STD_UNKNOWN if no signal is detected.
Otherwise AND the standard mask with the detected standards.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/saa7110.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/i2c/saa7110.c b/drivers/media/i2c/saa7110.c index 532105de96f0..ac43e929a1d6 100644 --- a/drivers/media/i2c/saa7110.c +++ b/drivers/media/i2c/saa7110.c @@ -202,7 +202,7 @@ static v4l2_std_id determine_norm(struct v4l2_subdev *sd) status = saa7110_read(sd); if (status & 0x40) { v4l2_dbg(1, debug, sd, "status=0x%02x (no signal)\n", status); - return decoder->norm; /* no change*/ + return V4L2_STD_UNKNOWN; } if ((status & 3) == 0) { saa7110_write(sd, 0x06, 0x83); @@ -264,7 +264,7 @@ static int saa7110_g_input_status(struct v4l2_subdev *sd, u32 *pstatus) static int saa7110_querystd(struct v4l2_subdev *sd, v4l2_std_id *std) { - *(v4l2_std_id *)std = determine_norm(sd); + *std &= determine_norm(sd); return 0; } |