diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2010-08-06 16:42:55 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 01:04:39 -0200 |
commit | b8c75ed898408cc7ca599a20ce27c40c425bd143 (patch) | |
tree | c2bf2eb4e832a09d29ed41bfe5699f807f376ad2 /drivers/staging/go7007/go7007-v4l2.c | |
parent | 515d93fb238e201901610bceddedc4027f565d5e (diff) |
V4L/DVB: go7007: convert to use the mediabus API
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/go7007/go7007-v4l2.c')
-rw-r--r-- | drivers/staging/go7007/go7007-v4l2.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/staging/go7007/go7007-v4l2.c b/drivers/staging/go7007/go7007-v4l2.c index 46b4b9f6855b..2b27d8da70a2 100644 --- a/drivers/staging/go7007/go7007-v4l2.c +++ b/drivers/staging/go7007/go7007-v4l2.c @@ -252,23 +252,22 @@ static int set_capture_size(struct go7007 *go, struct v4l2_format *fmt, int try) go->modet_map[i] = 0; if (go->board_info->sensor_flags & GO7007_SENSOR_SCALING) { - struct v4l2_format res; + struct v4l2_mbus_framefmt mbus_fmt; - if (fmt != NULL) { - res = *fmt; - } else { - res.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - res.fmt.pix.width = width; - } + mbus_fmt.code = V4L2_MBUS_FMT_FIXED; + if (fmt != NULL) + mbus_fmt.width = fmt->fmt.pix.width; + else + mbus_fmt.width = width; if (height > sensor_height / 2) { - res.fmt.pix.height = height / 2; + mbus_fmt.height = height / 2; go->encoder_v_halve = 0; } else { - res.fmt.pix.height = height; + mbus_fmt.height = height; go->encoder_v_halve = 1; } - call_all(&go->v4l2_dev, video, s_fmt, &res); + call_all(&go->v4l2_dev, video, s_mbus_fmt, &mbus_fmt); } else { if (width <= sensor_width / 4) { go->encoder_h_halve = 1; |