[media] tm6000: remove deprecated current_norm
authorHans Verkuil <hans.verkuil@cisco.com>
Mon, 3 Jun 2013 08:36:44 +0000 (05:36 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 17 Jun 2013 12:35:27 +0000 (09:35 -0300)
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: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/tm6000/tm6000-cards.c
drivers/media/usb/tm6000/tm6000-video.c

index 307d8c5fb7cd771654a1bc08d0c0f94f45c2d103..1ccaaddaa307874479faf08ccb56ecce76c76cca 100644 (file)
@@ -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);
index a78de1d1bc9eebf24597a198670268239a2a09df..cc1aa14996ff04ebc75f4d8c050075bb34c7128e 100644 (file)
@@ -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 = {