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

V4L/DVB: 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.
Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 3f5e1824
...@@ -137,8 +137,6 @@ static int PowerOnAtOpen = 1; ...@@ -137,8 +137,6 @@ static int PowerOnAtOpen = 1;
static int video_nr = -1; static int video_nr = -1;
/* Sequential Number of Radio Device */ /* Sequential Number of Radio Device */
static int radio_nr = -1; static int radio_nr = -1;
/* Sequential Number of VBI Device */
static int vbi_nr = -1;
/* Grab parameters for the device driver */ /* Grab parameters for the device driver */
...@@ -148,14 +146,12 @@ module_param(video_debug, int, 0444); ...@@ -148,14 +146,12 @@ module_param(video_debug, int, 0444);
module_param(PowerOnAtOpen, int, 0444); module_param(PowerOnAtOpen, int, 0444);
module_param(video_nr, int, 0444); module_param(video_nr, int, 0444);
module_param(radio_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(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(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(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(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(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 // Misc stuff
...@@ -1244,36 +1240,6 @@ static int usbvision_radio_close(struct file *file) ...@@ -1244,36 +1240,6 @@ static int usbvision_radio_close(struct file *file)
return errCode; 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 // Video registration stuff
// //
...@@ -1367,21 +1333,6 @@ static struct video_device usbvision_radio_template = { ...@@ -1367,21 +1333,6 @@ static struct video_device usbvision_radio_template = {
.current_norm = V4L2_STD_PAL .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, static struct video_device *usbvision_vdev_init(struct usb_usbvision *usbvision,
struct video_device *vdev_template, struct video_device *vdev_template,
...@@ -1410,18 +1361,6 @@ static struct video_device *usbvision_vdev_init(struct usb_usbvision *usbvision, ...@@ -1410,18 +1361,6 @@ static struct video_device *usbvision_vdev_init(struct usb_usbvision *usbvision,
// unregister video4linux devices // unregister video4linux devices
static void usbvision_unregister_video(struct usb_usbvision *usbvision) 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: // Radio Device:
if (usbvision->rdev) { if (usbvision->rdev) {
PDEBUG(DBG_PROBE, "unregister %s [v4l2]", PDEBUG(DBG_PROBE, "unregister %s [v4l2]",
...@@ -1482,22 +1421,6 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision) ...@@ -1482,22 +1421,6 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision)
printk(KERN_INFO "USBVision[%d]: registered USBVision Radio device %s [v4l2]\n", printk(KERN_INFO "USBVision[%d]: registered USBVision Radio device %s [v4l2]\n",
usbvision->nr, video_device_node_name(usbvision->rdev)); 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 // all done
return 0; return 0;
......
...@@ -360,7 +360,6 @@ struct usb_usbvision { ...@@ -360,7 +360,6 @@ struct usb_usbvision {
struct v4l2_device v4l2_dev; struct v4l2_device v4l2_dev;
struct video_device *vdev; /* Video Device */ struct video_device *vdev; /* Video Device */
struct video_device *rdev; /* Radio Device */ struct video_device *rdev; /* Radio Device */
struct video_device *vbi; /* VBI Device */
/* i2c Declaration Section*/ /* i2c Declaration Section*/
struct i2c_adapter i2c_adap; struct i2c_adapter i2c_adap;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册