提交 804be2d4 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

[media] tm6000: remove deprecated current_norm

Replace current_norm by g_std. Also initialize the standard to the more
common NTSC-M format (which is also what current_norm used).
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 28221f88
......@@ -1114,7 +1114,7 @@ static int tm6000_init_dev(struct tm6000_core *dev)
/* Default values for STD and resolutions */
dev->width = 720;
dev->height = 480;
dev->norm = V4L2_STD_PAL_M;
dev->norm = V4L2_STD_NTSC_M;
/* Configure tuner */
tm6000_config_tuner(dev);
......
......@@ -1076,6 +1076,15 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id norm)
return 0;
}
static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm)
{
struct tm6000_fh *fh = priv;
struct tm6000_core *dev = fh->dev;
*norm = dev->norm;
return 0;
}
static const char *iname[] = {
[TM6000_INPUT_TV] = "Television",
[TM6000_INPUT_COMPOSITE1] = "Composite 1",
......@@ -1134,7 +1143,7 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int i)
dev->input = i;
rc = vidioc_s_std(file, priv, dev->vfd->current_norm);
rc = vidioc_s_std(file, priv, dev->norm);
return rc;
}
......@@ -1547,6 +1556,7 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
.vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap,
.vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap,
.vidioc_s_std = vidioc_s_std,
.vidioc_g_std = vidioc_g_std,
.vidioc_enum_input = vidioc_enum_input,
.vidioc_g_input = vidioc_g_input,
.vidioc_s_input = vidioc_s_input,
......@@ -1570,7 +1580,6 @@ static struct video_device tm6000_template = {
.ioctl_ops = &video_ioctl_ops,
.release = video_device_release,
.tvnorms = TM6000_STD,
.current_norm = V4L2_STD_NTSC_M,
};
static const struct v4l2_file_operations radio_fops = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册