From 3b8436d9db43a810dd44393733b34fda6e0f0b9d Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 3 Jun 2013 05:36:47 -0300 Subject: [PATCH] [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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/usbvision/usbvision-video.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c index d34c2afe2c24..7ad872a3e31a 100644 --- a/drivers/media/usb/usbvision/usbvision-video.c +++ b/drivers/media/usb/usbvision/usbvision-video.c @@ -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 }; -- 2.39.5