Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
416e87a4 e83c30c7

+2 -2
+2 -2
drivers/media/i2c/saa7110.c
··· 202 202 status = saa7110_read(sd); 203 203 if (status & 0x40) { 204 204 v4l2_dbg(1, debug, sd, "status=0x%02x (no signal)\n", status); 205 - return decoder->norm; /* no change*/ 205 + return V4L2_STD_UNKNOWN; 206 206 } 207 207 if ((status & 3) == 0) { 208 208 saa7110_write(sd, 0x06, 0x83); ··· 264 264 265 265 static int saa7110_querystd(struct v4l2_subdev *sd, v4l2_std_id *std) 266 266 { 267 - *(v4l2_std_id *)std = determine_norm(sd); 267 + *std &= determine_norm(sd); 268 268 return 0; 269 269 } 270 270