[media] usbvision: replace current_norm by g_std

current_norm use is deprecated because it is per-devicenode and if you
have more device nodes all dependent on the same video source, then this
no longer works. Just implement g_std instead.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Hans Verkuil 2013-06-03 05:36:47 -03:00 committed by Mauro Carvalho Chehab
parent 9c1f5df813
commit 3b8436d9db
1 changed files with 9 additions and 4 deletions

View File

@ -608,6 +608,14 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id id)
return 0;
}
static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *id)
{
struct usb_usbvision *usbvision = video_drvdata(file);
*id = usbvision->tvnorm_id;
return 0;
}
static int vidioc_g_tuner(struct file *file, void *priv,
struct v4l2_tuner *vt)
{
@ -1248,6 +1256,7 @@ static const struct v4l2_ioctl_ops usbvision_ioctl_ops = {
.vidioc_qbuf = vidioc_qbuf,
.vidioc_dqbuf = vidioc_dqbuf,
.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,
@ -1274,7 +1283,6 @@ static struct video_device usbvision_video_template = {
.name = "usbvision-video",
.release = video_device_release,
.tvnorms = USBVISION_NORMS,
.current_norm = V4L2_STD_PAL
};
@ -1307,9 +1315,6 @@ static struct video_device usbvision_radio_template = {
.name = "usbvision-radio",
.release = video_device_release,
.ioctl_ops = &usbvision_radio_ioctl_ops,
.tvnorms = USBVISION_NORMS,
.current_norm = V4L2_STD_PAL
};