aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/saa7115.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c
index 86627a8fdbfb..5cfdbc78b918 100644
--- a/drivers/media/video/saa7115.c
+++ b/drivers/media/video/saa7115.c
@@ -1346,17 +1346,23 @@ static int saa711x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
1346 struct saa711x_state *state = to_state(sd); 1346 struct saa711x_state *state = to_state(sd);
1347 int reg1f, reg1e; 1347 int reg1f, reg1e;
1348 1348
1349 /*
1350 * The V4L2 core already initializes std with all supported
1351 * Standards. All driver needs to do is to mask it, to remove
1352 * standards that don't apply from the mask
1353 */
1354
1349 reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC); 1355 reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
1350 v4l2_dbg(1, debug, sd, "Status byte 2 (0x1f)=0x%02x\n", reg1f); 1356 v4l2_dbg(1, debug, sd, "Status byte 2 (0x1f)=0x%02x\n", reg1f);
1351 if (reg1f & 0x40) { 1357
1352 /* horizontal/vertical not locked */ 1358 /* horizontal/vertical not locked */
1353 *std = V4L2_STD_ALL; 1359 if (reg1f & 0x40)
1354 goto ret; 1360 goto ret;
1355 } 1361
1356 if (reg1f & 0x20) 1362 if (reg1f & 0x20)
1357 *std = V4L2_STD_525_60; 1363 *std &= V4L2_STD_525_60;
1358 else 1364 else
1359 *std = V4L2_STD_625_50; 1365 *std &= V4L2_STD_625_50;
1360 1366
1361 if (state->ident != V4L2_IDENT_SAA7115) 1367 if (state->ident != V4L2_IDENT_SAA7115)
1362 goto ret; 1368 goto ret;
@@ -1381,7 +1387,6 @@ static int saa711x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
1381 break; 1387 break;
1382 default: 1388 default:
1383 /* Can't detect anything */ 1389 /* Can't detect anything */
1384 *std = V4L2_STD_ALL;
1385 break; 1390 break;
1386 } 1391 }
1387 1392