diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-09-05 10:38:10 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-01 17:12:51 -0300 |
commit | 30634e8e41d413b0084ba29f843361a1fd9fbdce (patch) | |
tree | 0712b67462e242c926502ff697beed75b6f078d6 /drivers/media/i2c | |
parent | 34a6b7d093d8fe738ada191b36648d00bc18b7eb (diff) |
[media] sliced vbi: subdevs shouldn't clear the full v4l2_sliced_vbi_format struct
Various subdevs cleared the full v4l2_sliced_vbi_format struct, when
only the service_set/lines fields should have been cleared.
Due to this the io_size field was wrongly cleared to 0, causing a
v4l2-compliance error.
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/cx25840/cx25840-vbi.c | 3 | ||||
-rw-r--r-- | drivers/media/i2c/saa7115.c | 3 | ||||
-rw-r--r-- | drivers/media/i2c/saa7127.c | 2 | ||||
-rw-r--r-- | drivers/media/i2c/tvp5150.c | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/i2c/cx25840/cx25840-vbi.c b/drivers/media/i2c/cx25840/cx25840-vbi.c index 64a4004f8a9..c39e91dc113 100644 --- a/drivers/media/i2c/cx25840/cx25840-vbi.c +++ b/drivers/media/i2c/cx25840/cx25840-vbi.c @@ -96,7 +96,8 @@ int cx25840_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format * int is_pal = !(state->std & V4L2_STD_525_60); int i; - memset(svbi, 0, sizeof(*svbi)); + memset(svbi->service_lines, 0, sizeof(svbi->service_lines)); + svbi->service_set = 0; /* we're done if raw VBI is active */ if ((cx25840_read(client, 0x404) & 0x10) == 0) return 0; diff --git a/drivers/media/i2c/saa7115.c b/drivers/media/i2c/saa7115.c index 2107336cd83..6b6788cd08f 100644 --- a/drivers/media/i2c/saa7115.c +++ b/drivers/media/i2c/saa7115.c @@ -1066,7 +1066,8 @@ static int saa711x_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_f }; int i; - memset(sliced, 0, sizeof(*sliced)); + memset(sliced->service_lines, 0, sizeof(sliced->service_lines)); + sliced->service_set = 0; /* done if using raw VBI */ if (saa711x_read(sd, R_80_GLOBAL_CNTL_1) & 0x10) return 0; diff --git a/drivers/media/i2c/saa7127.c b/drivers/media/i2c/saa7127.c index 8ecb6564a31..b745f68fbc9 100644 --- a/drivers/media/i2c/saa7127.c +++ b/drivers/media/i2c/saa7127.c @@ -625,7 +625,7 @@ static int saa7127_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_f { struct saa7127_state *state = to_state(sd); - memset(fmt, 0, sizeof(*fmt)); + memset(fmt->service_lines, 0, sizeof(fmt->service_lines)); if (state->vps_enable) fmt->service_lines[0][16] = V4L2_SLICED_VPS; if (state->wss_enable) diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index b5b1792479d..31104a96065 100644 --- a/drivers/media/i2c/tvp5150.c +++ b/drivers/media/i2c/tvp5150.c @@ -1020,7 +1020,7 @@ static int tvp5150_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_f { int i, mask = 0; - memset(svbi, 0, sizeof(*svbi)); + memset(svbi->service_lines, 0, sizeof(svbi->service_lines)); for (i = 0; i <= 23; i++) { svbi->service_lines[0][i] = |