summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/saa7115.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-05-29 15:18:58 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-17 14:43:14 +0200
commitaf1f7284da471e68508457da92deab2517d48ff4 (patch)
tree69876af9111cbd3f05692568d1dda032cb7655b1 /drivers/media/i2c/saa7115.c
parent[media] saa7110: fix querystd (diff)
downloadlinux-af1f7284da471e68508457da92deab2517d48ff4.tar.xz
linux-af1f7284da471e68508457da92deab2517d48ff4.zip
[media] saa7115: fix querystd
Return V4L2_STD_UNKNOWN if no signal is detected. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c/saa7115.c')
-rw-r--r--drivers/media/i2c/saa7115.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/i2c/saa7115.c b/drivers/media/i2c/saa7115.c
index 90c43f3fb0f1..7fd766ec64c8 100644
--- a/drivers/media/i2c/saa7115.c
+++ b/drivers/media/i2c/saa7115.c
@@ -1428,6 +1428,7 @@ static int saa711x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
*std &= V4L2_STD_SECAM;
break;
default:
+ *std = V4L2_STD_UNKNOWN;
/* Can't detect anything */
break;
}
@@ -1436,8 +1437,10 @@ static int saa711x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
v4l2_dbg(1, debug, sd, "Status byte 2 (0x1f)=0x%02x\n", reg1f);
/* horizontal/vertical not locked */
- if (reg1f & 0x40)
+ if (reg1f & 0x40) {
+ *std = V4L2_STD_UNKNOWN;
goto ret;
+ }
if (reg1f & 0x20)
*std &= V4L2_STD_525_60;