Commit 2b5d9480 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] ivtv: fill in service_set

The service_set field of struct v4l2_sliced_vbi_cap was never filled in.
The v4l2-compliance tool complained about this, so this is now fixed.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 8c79eece
...@@ -1203,9 +1203,7 @@ static int ivtv_g_sliced_vbi_cap(struct file *file, void *fh, struct v4l2_sliced ...@@ -1203,9 +1203,7 @@ static int ivtv_g_sliced_vbi_cap(struct file *file, void *fh, struct v4l2_sliced
cap->service_lines[f][l] = set; cap->service_lines[f][l] = set;
} }
} }
return 0; } else if (cap->type == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT) {
}
if (cap->type == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT) {
if (!(itv->v4l2_cap & V4L2_CAP_SLICED_VBI_OUTPUT)) if (!(itv->v4l2_cap & V4L2_CAP_SLICED_VBI_OUTPUT))
return -EINVAL; return -EINVAL;
if (itv->is_60hz) { if (itv->is_60hz) {
...@@ -1215,9 +1213,16 @@ static int ivtv_g_sliced_vbi_cap(struct file *file, void *fh, struct v4l2_sliced ...@@ -1215,9 +1213,16 @@ static int ivtv_g_sliced_vbi_cap(struct file *file, void *fh, struct v4l2_sliced
cap->service_lines[0][23] = V4L2_SLICED_WSS_625; cap->service_lines[0][23] = V4L2_SLICED_WSS_625;
cap->service_lines[0][16] = V4L2_SLICED_VPS; cap->service_lines[0][16] = V4L2_SLICED_VPS;
} }
return 0; } else {
return -EINVAL;
} }
return -EINVAL;
set = 0;
for (f = 0; f < 2; f++)
for (l = 0; l < 24; l++)
set |= cap->service_lines[f][l];
cap->service_set = set;
return 0;
} }
static int ivtv_g_enc_index(struct file *file, void *fh, struct v4l2_enc_idx *idx) static int ivtv_g_enc_index(struct file *file, void *fh, struct v4l2_enc_idx *idx)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment