The patch number 14580 was added via Douglas Schilling Landgraf 
<[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <[email protected]>

------

From: Hans Verkuil  <[email protected]>
usbvision: remove non-working vbi device


The usbvision driver created vbi device nodes but the actual implementation
was just stubs and only returned errors to userspace.

In addition it used video_usercopy() and we want to remove that eventually.

So remove all the vbi code except for the vbi flag in the card definition
should someone ever be mad enough to work on a proper implementation for this
driver.

Priority: normal

Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Douglas Schilling Landgraf <[email protected]>


---

 linux/drivers/media/video/usbvision/usbvision-video.c |   77 ----------
 linux/drivers/media/video/usbvision/usbvision.h       |    1 
 2 files changed, 78 deletions(-)

diff -r 6f8a654ebb6f -r f2c1a852cd0a 
linux/drivers/media/video/usbvision/usbvision-video.c
--- a/linux/drivers/media/video/usbvision/usbvision-video.c     Sun Apr 18 
08:51:37 2010 -0300
+++ b/linux/drivers/media/video/usbvision/usbvision-video.c     Sun Apr 18 
08:53:19 2010 -0300
@@ -137,8 +137,6 @@
 static int video_nr = -1;
 /* Sequential Number of Radio Device */
 static int radio_nr = -1;
-/* Sequential Number of VBI Device */
-static int vbi_nr = -1;
 
 /* Grab parameters for the device driver */
 
@@ -148,14 +146,12 @@
 module_param(PowerOnAtOpen, int, 0444);
 module_param(video_nr, int, 0444);
 module_param(radio_nr, int, 0444);
-module_param(vbi_nr, int, 0444);
 
 MODULE_PARM_DESC(isocMode, " Set the default format for ISOC endpoint.  
Default: 0x60 (Compression On)");
 MODULE_PARM_DESC(video_debug, " Set the default Debug Mode of the device 
driver.  Default: 0 (Off)");
 MODULE_PARM_DESC(PowerOnAtOpen, " Set the default device to power on when 
device is opened.  Default: 1 (On)");
 MODULE_PARM_DESC(video_nr, "Set video device number (/dev/videoX).  Default: 
-1 (autodetect)");
 MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX).  Default: 
-1 (autodetect)");
-MODULE_PARM_DESC(vbi_nr, "Set vbi device number (/dev/vbiX).  Default: -1 
(autodetect)");
 
 
 // Misc stuff
@@ -1244,36 +1240,6 @@
        return errCode;
 }
 
-/*
- * Here comes the stuff for vbi on usbvision based devices
- *
- */
-static int usbvision_vbi_open(struct file *file)
-{
-       /* TODO */
-       return -ENODEV;
-}
-
-static int usbvision_vbi_close(struct file *file)
-{
-       /* TODO */
-       return -ENODEV;
-}
-
-static long usbvision_do_vbi_ioctl(struct file *file,
-                                unsigned int cmd, void *arg)
-{
-       /* TODO */
-       return -ENOIOCTLCMD;
-}
-
-static long usbvision_vbi_ioctl(struct file *file,
-                      unsigned int cmd, unsigned long arg)
-{
-       return video_usercopy(file, cmd, arg, usbvision_do_vbi_ioctl);
-}
-
-
 //
 // Video registration stuff
 //
@@ -1367,21 +1333,6 @@
        .current_norm         = V4L2_STD_PAL
 };
 
-// vbi template
-static const struct v4l2_file_operations usbvision_vbi_fops = {
-       .owner             = THIS_MODULE,
-       .open           = usbvision_vbi_open,
-       .release        = usbvision_vbi_close,
-       .ioctl          = usbvision_vbi_ioctl,
-};
-
-static struct video_device usbvision_vbi_template=
-{
-       .fops           = &usbvision_vbi_fops,
-       .release        = video_device_release,
-       .name           = "usbvision-vbi",
-};
-
 
 static struct video_device *usbvision_vdev_init(struct usb_usbvision 
*usbvision,
                                        struct video_device *vdev_template,
@@ -1410,18 +1361,6 @@
 // unregister video4linux devices
 static void usbvision_unregister_video(struct usb_usbvision *usbvision)
 {
-       // vbi Device:
-       if (usbvision->vbi) {
-               PDEBUG(DBG_PROBE, "unregister %s [v4l2]",
-                      video_device_node_name(usbvision->vbi));
-               if (video_is_registered(usbvision->vbi)) {
-                       video_unregister_device(usbvision->vbi);
-               } else {
-                       video_device_release(usbvision->vbi);
-               }
-               usbvision->vbi = NULL;
-       }
-
        // Radio Device:
        if (usbvision->rdev) {
                PDEBUG(DBG_PROBE, "unregister %s [v4l2]",
@@ -1482,22 +1421,6 @@
                printk(KERN_INFO "USBVision[%d]: registered USBVision Radio 
device %s [v4l2]\n",
                       usbvision->nr, video_device_node_name(usbvision->rdev));
        }
-       // vbi Device:
-       if (usbvision_device_data[usbvision->DevModel].vbi) {
-               usbvision->vbi = usbvision_vdev_init(usbvision,
-                                                    &usbvision_vbi_template,
-                                                    "USBVision VBI");
-               if (usbvision->vbi == NULL) {
-                       goto err_exit;
-               }
-               if (video_register_device(usbvision->vbi,
-                                         VFL_TYPE_VBI,
-                                         vbi_nr)<0) {
-                       goto err_exit;
-               }
-               printk(KERN_INFO "USBVision[%d]: registered USBVision VBI 
device %s [v4l2] (Not Working Yet!)\n",
-                      usbvision->nr, video_device_node_name(usbvision->vbi));
-       }
        // all done
        return 0;
 
diff -r 6f8a654ebb6f -r f2c1a852cd0a 
linux/drivers/media/video/usbvision/usbvision.h
--- a/linux/drivers/media/video/usbvision/usbvision.h   Sun Apr 18 08:51:37 
2010 -0300
+++ b/linux/drivers/media/video/usbvision/usbvision.h   Sun Apr 18 08:53:19 
2010 -0300
@@ -361,7 +361,6 @@
        struct v4l2_device v4l2_dev;
        struct video_device *vdev;                                      /* 
Video Device */
        struct video_device *rdev;                                      /* 
Radio Device */
-       struct video_device *vbi;                                       /* VBI 
Device   */
 
        /* i2c Declaration Section*/
        struct i2c_adapter i2c_adap;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/f2c1a852cd0a32b373e1b9baeca5c2e254ac1f07

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to