aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-04-06 07:20:56 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:57:07 -0400
commitfa0290eaee03c3205cb6d344db25580fb3e5e53e (patch)
tree3aa6870ff083cef8495191a564473f0ad658f91b /drivers
parent3f5e18249ce0d71a900bfdb8df327269483e730d (diff)
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: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/usbvision/usbvision-video.c77
-rw-r--r--drivers/media/video/usbvision/usbvision.h1
2 files changed, 0 insertions, 78 deletions
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c
index 7c17ec63c5d..d91f0166807 100644
--- a/drivers/media/video/usbvision/usbvision-video.c
+++ b/drivers/media/video/usbvision/usbvision-video.c
@@ -137,8 +137,6 @@ static int PowerOnAtOpen = 1;
137static int video_nr = -1; 137static int video_nr = -1;
138/* Sequential Number of Radio Device */ 138/* Sequential Number of Radio Device */
139static int radio_nr = -1; 139static int radio_nr = -1;
140/* Sequential Number of VBI Device */
141static int vbi_nr = -1;
142 140
143/* Grab parameters for the device driver */ 141/* Grab parameters for the device driver */
144 142
@@ -148,14 +146,12 @@ module_param(video_debug, int, 0444);
148module_param(PowerOnAtOpen, int, 0444); 146module_param(PowerOnAtOpen, int, 0444);
149module_param(video_nr, int, 0444); 147module_param(video_nr, int, 0444);
150module_param(radio_nr, int, 0444); 148module_param(radio_nr, int, 0444);
151module_param(vbi_nr, int, 0444);
152 149
153MODULE_PARM_DESC(isocMode, " Set the default format for ISOC endpoint. Default: 0x60 (Compression On)"); 150MODULE_PARM_DESC(isocMode, " Set the default format for ISOC endpoint. Default: 0x60 (Compression On)");
154MODULE_PARM_DESC(video_debug, " Set the default Debug Mode of the device driver. Default: 0 (Off)"); 151MODULE_PARM_DESC(video_debug, " Set the default Debug Mode of the device driver. Default: 0 (Off)");
155MODULE_PARM_DESC(PowerOnAtOpen, " Set the default device to power on when device is opened. Default: 1 (On)"); 152MODULE_PARM_DESC(PowerOnAtOpen, " Set the default device to power on when device is opened. Default: 1 (On)");
156MODULE_PARM_DESC(video_nr, "Set video device number (/dev/videoX). Default: -1 (autodetect)"); 153MODULE_PARM_DESC(video_nr, "Set video device number (/dev/videoX). Default: -1 (autodetect)");
157MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX). Default: -1 (autodetect)"); 154MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX). Default: -1 (autodetect)");
158MODULE_PARM_DESC(vbi_nr, "Set vbi device number (/dev/vbiX). Default: -1 (autodetect)");
159 155
160 156
161// Misc stuff 157// Misc stuff
@@ -1244,36 +1240,6 @@ static int usbvision_radio_close(struct file *file)
1244 return errCode; 1240 return errCode;
1245} 1241}
1246 1242
1247/*
1248 * Here comes the stuff for vbi on usbvision based devices
1249 *
1250 */
1251static int usbvision_vbi_open(struct file *file)
1252{
1253 /* TODO */
1254 return -ENODEV;
1255}
1256
1257static int usbvision_vbi_close(struct file *file)
1258{
1259 /* TODO */
1260 return -ENODEV;
1261}
1262
1263static long usbvision_do_vbi_ioctl(struct file *file,
1264 unsigned int cmd, void *arg)
1265{
1266 /* TODO */
1267 return -ENOIOCTLCMD;
1268}
1269
1270static long usbvision_vbi_ioctl(struct file *file,
1271 unsigned int cmd, unsigned long arg)
1272{
1273 return video_usercopy(file, cmd, arg, usbvision_do_vbi_ioctl);
1274}
1275
1276
1277// 1243//
1278// Video registration stuff 1244// Video registration stuff
1279// 1245//
@@ -1367,21 +1333,6 @@ static struct video_device usbvision_radio_template = {
1367 .current_norm = V4L2_STD_PAL 1333 .current_norm = V4L2_STD_PAL
1368}; 1334};
1369 1335
1370// vbi template
1371static const struct v4l2_file_operations usbvision_vbi_fops = {
1372 .owner = THIS_MODULE,
1373 .open = usbvision_vbi_open,
1374 .release = usbvision_vbi_close,
1375 .ioctl = usbvision_vbi_ioctl,
1376};
1377
1378static struct video_device usbvision_vbi_template=
1379{
1380 .fops = &usbvision_vbi_fops,
1381 .release = video_device_release,
1382 .name = "usbvision-vbi",
1383};
1384
1385 1336
1386static struct video_device *usbvision_vdev_init(struct usb_usbvision *usbvision, 1337static struct video_device *usbvision_vdev_init(struct usb_usbvision *usbvision,
1387 struct video_device *vdev_template, 1338 struct video_device *vdev_template,
@@ -1410,18 +1361,6 @@ static struct video_device *usbvision_vdev_init(struct usb_usbvision *usbvision,
1410// unregister video4linux devices 1361// unregister video4linux devices
1411static void usbvision_unregister_video(struct usb_usbvision *usbvision) 1362static void usbvision_unregister_video(struct usb_usbvision *usbvision)
1412{ 1363{
1413 // vbi Device:
1414 if (usbvision->vbi) {
1415 PDEBUG(DBG_PROBE, "unregister %s [v4l2]",
1416 video_device_node_name(usbvision->vbi));
1417 if (video_is_registered(usbvision->vbi)) {
1418 video_unregister_device(usbvision->vbi);
1419 } else {
1420 video_device_release(usbvision->vbi);
1421 }
1422 usbvision->vbi = NULL;
1423 }
1424
1425 // Radio Device: 1364 // Radio Device:
1426 if (usbvision->rdev) { 1365 if (usbvision->rdev) {
1427 PDEBUG(DBG_PROBE, "unregister %s [v4l2]", 1366 PDEBUG(DBG_PROBE, "unregister %s [v4l2]",
@@ -1482,22 +1421,6 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision)
1482 printk(KERN_INFO "USBVision[%d]: registered USBVision Radio device %s [v4l2]\n", 1421 printk(KERN_INFO "USBVision[%d]: registered USBVision Radio device %s [v4l2]\n",
1483 usbvision->nr, video_device_node_name(usbvision->rdev)); 1422 usbvision->nr, video_device_node_name(usbvision->rdev));
1484 } 1423 }
1485 // vbi Device:
1486 if (usbvision_device_data[usbvision->DevModel].vbi) {
1487 usbvision->vbi = usbvision_vdev_init(usbvision,
1488 &usbvision_vbi_template,
1489 "USBVision VBI");
1490 if (usbvision->vbi == NULL) {
1491 goto err_exit;
1492 }
1493 if (video_register_device(usbvision->vbi,
1494 VFL_TYPE_VBI,
1495 vbi_nr)<0) {
1496 goto err_exit;
1497 }
1498 printk(KERN_INFO "USBVision[%d]: registered USBVision VBI device %s [v4l2] (Not Working Yet!)\n",
1499 usbvision->nr, video_device_node_name(usbvision->vbi));
1500 }
1501 // all done 1424 // all done
1502 return 0; 1425 return 0;
1503 1426
diff --git a/drivers/media/video/usbvision/usbvision.h b/drivers/media/video/usbvision/usbvision.h
index f8d7458daf3..5ab936e252f 100644
--- a/drivers/media/video/usbvision/usbvision.h
+++ b/drivers/media/video/usbvision/usbvision.h
@@ -360,7 +360,6 @@ struct usb_usbvision {
360 struct v4l2_device v4l2_dev; 360 struct v4l2_device v4l2_dev;
361 struct video_device *vdev; /* Video Device */ 361 struct video_device *vdev; /* Video Device */
362 struct video_device *rdev; /* Radio Device */ 362 struct video_device *rdev; /* Radio Device */
363 struct video_device *vbi; /* VBI Device */
364 363
365 /* i2c Declaration Section*/ 364 /* i2c Declaration Section*/
366 struct i2c_adapter i2c_adap; 365 struct i2c_adapter i2c_adap;