diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2015-11-30 07:28:23 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-12-18 10:35:01 -0500 |
commit | bfd1bbfb54ac73175f5925ba32f14815315df30f (patch) | |
tree | f65055bb2a9101a3a4dea4b821c490ca2392887b | |
parent | e69d89420e2297a896056bb29746a27d98d9b111 (diff) |
[media] cx25840: initialize the standard to NTSC_M
This is necessary since the *_std_setup functions rely on a valid state->std
field.
Also fix the cx23888_std_setup() to test for 60Hz instead of NTSC, just like
cx25840_std_setup() does.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/i2c/cx25840/cx25840-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/i2c/cx25840/cx25840-core.c b/drivers/media/i2c/cx25840/cx25840-core.c index a8b1a03d3158..f2e2c34ddbbd 100644 --- a/drivers/media/i2c/cx25840/cx25840-core.c +++ b/drivers/media/i2c/cx25840/cx25840-core.c | |||
@@ -4977,7 +4977,7 @@ static void cx23888_std_setup(struct i2c_client *client) | |||
4977 | cx25840_write4(client, 0x4b4, 0x20524030); | 4977 | cx25840_write4(client, 0x4b4, 0x20524030); |
4978 | cx25840_write4(client, 0x47c, 0x010a8263); | 4978 | cx25840_write4(client, 0x47c, 0x010a8263); |
4979 | 4979 | ||
4980 | if (std & V4L2_STD_NTSC) { | 4980 | if (std & V4L2_STD_525_60) { |
4981 | v4l_dbg(1, cx25840_debug, client, "%s() Selecting NTSC", | 4981 | v4l_dbg(1, cx25840_debug, client, "%s() Selecting NTSC", |
4982 | __func__); | 4982 | __func__); |
4983 | 4983 | ||
@@ -5268,6 +5268,7 @@ static int cx25840_probe(struct i2c_client *client, | |||
5268 | state->id = id; | 5268 | state->id = id; |
5269 | state->rev = device_id; | 5269 | state->rev = device_id; |
5270 | state->vbi_regs_offset = id == CX23888_AV ? 0x500 - 0x424 : 0; | 5270 | state->vbi_regs_offset = id == CX23888_AV ? 0x500 - 0x424 : 0; |
5271 | state->std = V4L2_STD_NTSC_M; | ||
5271 | v4l2_ctrl_handler_init(&state->hdl, 9); | 5272 | v4l2_ctrl_handler_init(&state->hdl, 9); |
5272 | v4l2_ctrl_new_std(&state->hdl, &cx25840_ctrl_ops, | 5273 | v4l2_ctrl_new_std(&state->hdl, &cx25840_ctrl_ops, |
5273 | V4L2_CID_BRIGHTNESS, 0, 255, 1, 128); | 5274 | V4L2_CID_BRIGHTNESS, 0, 255, 1, 128); |