V4L/DVB (9327): v4l: use video_device.num instead of minor in video%d
The kernel number of a v4l2 node (e.g. videoX, radioX or vbiX) is now independent of the minor number. So instead of using the minor field of the video_device struct one has to use the num field: this always contains the kernel number of the device node. I forgot about this when I did the v4l2 core change, so this patch converts all drivers that use it in one go. Luckily the change is trivial. Cc: michael@mihu.de Cc: mchehab@infradead.org Cc: corbet@lwn.net Cc: luca.risolia@studio.unibo.it Cc: isely@pobox.com Cc: pe1rxq@amsat.org Cc: royale@zerezo.com Cc: mkrufky@linuxtv.org Cc: stoth@linuxtv.org Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
323a491a29
commit
c6330fb86f
@ -545,11 +545,11 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
|
||||
if( VFL_TYPE_GRABBER == type ) {
|
||||
vv->video_minor = vfd->minor;
|
||||
INFO(("%s: registered device video%d [v4l2]\n",
|
||||
dev->name, vfd->minor & 0x1f));
|
||||
dev->name, vfd->num));
|
||||
} else {
|
||||
vv->vbi_minor = vfd->minor;
|
||||
INFO(("%s: registered device vbi%d [v4l2]\n",
|
||||
dev->name, vfd->minor & 0x1f));
|
||||
dev->name, vfd->num));
|
||||
}
|
||||
|
||||
*vid = vfd;
|
||||
|
@ -866,7 +866,7 @@ static int __init ar_init(void)
|
||||
}
|
||||
|
||||
printk("video%d: Found M64278 VGA (IRQ %d, Freq %dMHz).\n",
|
||||
ar->vdev->minor, M32R_IRQ_INT3, freq);
|
||||
ar->vdev->num, M32R_IRQ_INT3, freq);
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -4246,7 +4246,7 @@ static int __devinit bttv_register_video(struct bttv *btv)
|
||||
video_nr[btv->c.nr]) < 0)
|
||||
goto err;
|
||||
printk(KERN_INFO "bttv%d: registered device video%d\n",
|
||||
btv->c.nr,btv->video_dev->minor & 0x1f);
|
||||
btv->c.nr, btv->video_dev->num);
|
||||
if (device_create_file(&btv->video_dev->dev,
|
||||
&dev_attr_card)<0) {
|
||||
printk(KERN_ERR "bttv%d: device_create_file 'card' "
|
||||
@ -4263,7 +4263,7 @@ static int __devinit bttv_register_video(struct bttv *btv)
|
||||
vbi_nr[btv->c.nr]) < 0)
|
||||
goto err;
|
||||
printk(KERN_INFO "bttv%d: registered device vbi%d\n",
|
||||
btv->c.nr,btv->vbi_dev->minor & 0x1f);
|
||||
btv->c.nr, btv->vbi_dev->num);
|
||||
|
||||
if (!btv->has_radio)
|
||||
return 0;
|
||||
@ -4275,7 +4275,7 @@ static int __devinit bttv_register_video(struct bttv *btv)
|
||||
radio_nr[btv->c.nr]) < 0)
|
||||
goto err;
|
||||
printk(KERN_INFO "bttv%d: registered device radio%d\n",
|
||||
btv->c.nr,btv->radio_dev->minor & 0x1f);
|
||||
btv->c.nr, btv->radio_dev->num);
|
||||
|
||||
/* all done */
|
||||
return 0;
|
||||
|
@ -815,7 +815,7 @@ static int init_cqcam(struct parport *port)
|
||||
}
|
||||
|
||||
printk(KERN_INFO "video%d: Colour QuickCam found on %s\n",
|
||||
qcam->vdev.minor, qcam->pport->name);
|
||||
qcam->vdev.num, qcam->pport->name);
|
||||
|
||||
qcams[num_cams++] = qcam;
|
||||
|
||||
|
@ -2059,10 +2059,10 @@ static void cafe_dfs_cam_setup(struct cafe_camera *cam)
|
||||
|
||||
if (!cafe_dfs_root)
|
||||
return;
|
||||
sprintf(fname, "regs-%d", cam->v4ldev.minor);
|
||||
sprintf(fname, "regs-%d", cam->v4ldev.num);
|
||||
cam->dfs_regs = debugfs_create_file(fname, 0444, cafe_dfs_root,
|
||||
cam, &cafe_dfs_reg_ops);
|
||||
sprintf(fname, "cam-%d", cam->v4ldev.minor);
|
||||
sprintf(fname, "cam-%d", cam->v4ldev.num);
|
||||
cam->dfs_cam_regs = debugfs_create_file(fname, 0444, cafe_dfs_root,
|
||||
cam, &cafe_dfs_cam_ops);
|
||||
}
|
||||
|
@ -1347,7 +1347,7 @@ static void create_proc_cpia_cam(struct cam_data *cam)
|
||||
if (!cpia_proc_root || !cam)
|
||||
return;
|
||||
|
||||
snprintf(name, sizeof(name), "video%d", cam->vdev.minor);
|
||||
snprintf(name, sizeof(name), "video%d", cam->vdev.num);
|
||||
|
||||
ent = create_proc_entry(name, S_IFREG|S_IRUGO|S_IWUSR, cpia_proc_root);
|
||||
if (!ent)
|
||||
@ -1372,7 +1372,7 @@ static void destroy_proc_cpia_cam(struct cam_data *cam)
|
||||
if (!cam || !cam->proc_entry)
|
||||
return;
|
||||
|
||||
snprintf(name, sizeof(name), "video%d", cam->vdev.minor);
|
||||
snprintf(name, sizeof(name), "video%d", cam->vdev.num);
|
||||
remove_proc_entry(name, cpia_proc_root);
|
||||
cam->proc_entry = NULL;
|
||||
}
|
||||
@ -4005,7 +4005,7 @@ void cpia_unregister_camera(struct cam_data *cam)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
DBG("destroying /proc/cpia/video%d\n", cam->vdev.minor);
|
||||
DBG("destroying /proc/cpia/video%d\n", cam->vdev.num);
|
||||
destroy_proc_cpia_cam(cam);
|
||||
#endif
|
||||
if (!cam->open_count) {
|
||||
|
@ -1973,7 +1973,7 @@ void cpia2_unregister_camera(struct camera_data *cam)
|
||||
} else {
|
||||
LOG("/dev/video%d removed while open, "
|
||||
"deferring video_unregister_device\n",
|
||||
cam->vdev->minor);
|
||||
cam->vdev->num);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1815,7 +1815,7 @@ int cx23885_417_register(struct cx23885_dev *dev)
|
||||
cx23885_mc417_init(dev);
|
||||
|
||||
printk(KERN_INFO "%s: registered device video%d [mpeg]\n",
|
||||
dev->name, dev->v4l_device->minor & 0x1f);
|
||||
dev->name, dev->v4l_device->num);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1543,7 +1543,7 @@ int cx23885_video_register(struct cx23885_dev *dev)
|
||||
goto fail_unreg;
|
||||
}
|
||||
printk(KERN_INFO "%s/0: registered device video%d [v4l2]\n",
|
||||
dev->name, dev->video_dev->minor & 0x1f);
|
||||
dev->name, dev->video_dev->num);
|
||||
/* initial device configuration */
|
||||
mutex_lock(&dev->lock);
|
||||
cx23885_set_tvnorm(dev, dev->tvnorm);
|
||||
|
@ -1285,7 +1285,7 @@ static int blackbird_register_video(struct cx8802_dev *dev)
|
||||
return err;
|
||||
}
|
||||
printk(KERN_INFO "%s/2: registered device video%d [mpeg]\n",
|
||||
dev->core->name,dev->mpeg_dev->minor & 0x1f);
|
||||
dev->core->name, dev->mpeg_dev->num);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1911,7 +1911,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
|
||||
goto fail_unreg;
|
||||
}
|
||||
printk(KERN_INFO "%s/0: registered device video%d [v4l2]\n",
|
||||
core->name,dev->video_dev->minor & 0x1f);
|
||||
core->name, dev->video_dev->num);
|
||||
|
||||
dev->vbi_dev = cx88_vdev_init(core,dev->pci,&cx8800_vbi_template,"vbi");
|
||||
err = video_register_device(dev->vbi_dev,VFL_TYPE_VBI,
|
||||
@ -1922,7 +1922,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
|
||||
goto fail_unreg;
|
||||
}
|
||||
printk(KERN_INFO "%s/0: registered device vbi%d\n",
|
||||
core->name,dev->vbi_dev->minor & 0x1f);
|
||||
core->name, dev->vbi_dev->num);
|
||||
|
||||
if (core->board.radio.type == CX88_RADIO) {
|
||||
dev->radio_dev = cx88_vdev_init(core,dev->pci,
|
||||
@ -1935,7 +1935,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
|
||||
goto fail_unreg;
|
||||
}
|
||||
printk(KERN_INFO "%s/0: registered device radio%d\n",
|
||||
core->name,dev->radio_dev->minor & 0x1f);
|
||||
core->name, dev->radio_dev->num);
|
||||
}
|
||||
|
||||
/* everything worked */
|
||||
|
@ -2042,7 +2042,7 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
|
||||
goto fail_unreg;
|
||||
}
|
||||
em28xx_info("Registered radio device as /dev/radio%d\n",
|
||||
dev->radio_dev->minor & 0x1f);
|
||||
dev->radio_dev->num);
|
||||
}
|
||||
|
||||
/* init video dma queues */
|
||||
|
@ -588,7 +588,7 @@ static int et61x251_stream_interrupt(struct et61x251_device* cam)
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "URB timeout reached. The camera is misconfigured. To "
|
||||
"use it, close and open /dev/video%d again.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@ -1195,7 +1195,7 @@ static void et61x251_release_resources(struct kref *kref)
|
||||
|
||||
cam = container_of(kref, struct et61x251_device, kref);
|
||||
|
||||
DBG(2, "V4L2 device /dev/video%d deregistered", cam->v4ldev->minor);
|
||||
DBG(2, "V4L2 device /dev/video%d deregistered", cam->v4ldev->num);
|
||||
video_set_drvdata(cam->v4ldev, NULL);
|
||||
video_unregister_device(cam->v4ldev);
|
||||
usb_put_dev(cam->usbdev);
|
||||
@ -1237,7 +1237,7 @@ static int et61x251_open(struct inode* inode, struct file* filp)
|
||||
|
||||
if (cam->users) {
|
||||
DBG(2, "Device /dev/video%d is already in use",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
DBG(3, "Simultaneous opens are not supported");
|
||||
if ((filp->f_flags & O_NONBLOCK) ||
|
||||
(filp->f_flags & O_NDELAY)) {
|
||||
@ -1280,7 +1280,7 @@ static int et61x251_open(struct inode* inode, struct file* filp)
|
||||
cam->frame_count = 0;
|
||||
et61x251_empty_framequeues(cam);
|
||||
|
||||
DBG(3, "Video device /dev/video%d is open", cam->v4ldev->minor);
|
||||
DBG(3, "Video device /dev/video%d is open", cam->v4ldev->num);
|
||||
|
||||
out:
|
||||
mutex_unlock(&cam->open_mutex);
|
||||
@ -1304,7 +1304,7 @@ static int et61x251_release(struct inode* inode, struct file* filp)
|
||||
cam->users--;
|
||||
wake_up_interruptible_nr(&cam->wait_open, 1);
|
||||
|
||||
DBG(3, "Video device /dev/video%d closed", cam->v4ldev->minor);
|
||||
DBG(3, "Video device /dev/video%d closed", cam->v4ldev->num);
|
||||
|
||||
kref_put(&cam->kref, et61x251_release_resources);
|
||||
|
||||
@ -1845,7 +1845,7 @@ et61x251_vidioc_s_crop(struct et61x251_device* cam, void __user * arg)
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "VIDIOC_S_CROP failed because of hardware problems. To "
|
||||
"use the camera, close and open /dev/video%d again.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@ -1858,7 +1858,7 @@ et61x251_vidioc_s_crop(struct et61x251_device* cam, void __user * arg)
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "VIDIOC_S_CROP failed because of not enough memory. To "
|
||||
"use the camera, close and open /dev/video%d again.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -2068,7 +2068,7 @@ et61x251_vidioc_try_s_fmt(struct et61x251_device* cam, unsigned int cmd,
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "VIDIOC_S_FMT failed because of hardware problems. To "
|
||||
"use the camera, close and open /dev/video%d again.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@ -2080,7 +2080,7 @@ et61x251_vidioc_try_s_fmt(struct et61x251_device* cam, unsigned int cmd,
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "VIDIOC_S_FMT failed because of not enough memory. To "
|
||||
"use the camera, close and open /dev/video%d again.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -2128,7 +2128,7 @@ et61x251_vidioc_s_jpegcomp(struct et61x251_device* cam, void __user * arg)
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "VIDIOC_S_JPEGCOMP failed because of hardware "
|
||||
"problems. To use the camera, close and open "
|
||||
"/dev/video%d again.", cam->v4ldev->minor);
|
||||
"/dev/video%d again.", cam->v4ldev->num);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@ -2605,7 +2605,7 @@ et61x251_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
DBG(2, "V4L2 device registered as /dev/video%d", cam->v4ldev->minor);
|
||||
DBG(2, "V4L2 device registered as /dev/video%d", cam->v4ldev->num);
|
||||
|
||||
cam->module_param.force_munmap = force_munmap[dev_nr];
|
||||
cam->module_param.frame_timeout = frame_timeout[dev_nr];
|
||||
@ -2658,7 +2658,7 @@ static void et61x251_usb_disconnect(struct usb_interface* intf)
|
||||
if (cam->users) {
|
||||
DBG(2, "Device /dev/video%d is open! Deregistration and "
|
||||
"memory deallocation are deferred.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
et61x251_stop_transfer(cam);
|
||||
cam->state |= DEV_DISCONNECTED;
|
||||
|
@ -893,7 +893,7 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
|
||||
|
||||
static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip)
|
||||
{
|
||||
int minor_id = dip->devbase.minor;
|
||||
int num = dip->devbase.num;
|
||||
struct pvr2_hdw *hdw = dip->v4lp->channel.mc_head->hdw;
|
||||
enum pvr2_config cfg = dip->config;
|
||||
int v4l_type = dip->v4l_type;
|
||||
@ -909,7 +909,7 @@ static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip)
|
||||
video_unregister_device(&dip->devbase);
|
||||
|
||||
printk(KERN_INFO "pvrusb2: unregistered device %s%u [%s]\n",
|
||||
get_v4l_name(v4l_type),minor_id & 0x1f,
|
||||
get_v4l_name(v4l_type), num,
|
||||
pvr2_config_get_name(cfg));
|
||||
|
||||
}
|
||||
@ -1310,7 +1310,7 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,
|
||||
}
|
||||
|
||||
printk(KERN_INFO "pvrusb2: registered device %s%u [%s]\n",
|
||||
get_v4l_name(dip->v4l_type),dip->devbase.minor & 0x1f,
|
||||
get_v4l_name(dip->v4l_type), dip->devbase.num,
|
||||
pvr2_config_get_name(dip->config));
|
||||
|
||||
pvr2_hdw_v4l_store_minor_number(vp->channel.mc_head->hdw,
|
||||
|
@ -1795,7 +1795,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
|
||||
goto err;
|
||||
}
|
||||
else {
|
||||
PWC_INFO("Registered as /dev/video%d.\n", pdev->vdev->minor & 0x3F);
|
||||
PWC_INFO("Registered as /dev/video%d.\n", pdev->vdev->num);
|
||||
}
|
||||
|
||||
/* occupy slot */
|
||||
|
@ -996,7 +996,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
|
||||
goto fail4;
|
||||
}
|
||||
printk(KERN_INFO "%s: registered device video%d [v4l2]\n",
|
||||
dev->name,dev->video_dev->minor & 0x1f);
|
||||
dev->name, dev->video_dev->num);
|
||||
|
||||
dev->vbi_dev = vdev_init(dev, &saa7134_video_template, "vbi");
|
||||
|
||||
@ -1005,7 +1005,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
|
||||
if (err < 0)
|
||||
goto fail4;
|
||||
printk(KERN_INFO "%s: registered device vbi%d\n",
|
||||
dev->name,dev->vbi_dev->minor & 0x1f);
|
||||
dev->name, dev->vbi_dev->num);
|
||||
|
||||
if (card_has_radio(dev)) {
|
||||
dev->radio_dev = vdev_init(dev,&saa7134_radio_template,"radio");
|
||||
@ -1014,7 +1014,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
|
||||
if (err < 0)
|
||||
goto fail4;
|
||||
printk(KERN_INFO "%s: registered device radio%d\n",
|
||||
dev->name,dev->radio_dev->minor & 0x1f);
|
||||
dev->name, dev->radio_dev->num);
|
||||
}
|
||||
|
||||
/* everything worked */
|
||||
|
@ -534,7 +534,7 @@ static int empress_init(struct saa7134_dev *dev)
|
||||
return err;
|
||||
}
|
||||
printk(KERN_INFO "%s: registered device video%d [mpeg]\n",
|
||||
dev->name,dev->empress_dev->minor & 0x1f);
|
||||
dev->name, dev->empress_dev->num);
|
||||
|
||||
videobuf_queue_sg_init(&dev->empress_tsq, &saa7134_ts_qops,
|
||||
&dev->pci->dev, &dev->slock,
|
||||
|
@ -1412,7 +1412,7 @@ static int se401_probe(struct usb_interface *intf,
|
||||
return -EIO;
|
||||
}
|
||||
dev_info(&intf->dev, "registered new video device: video%d\n",
|
||||
se401->vdev.minor);
|
||||
se401->vdev.num);
|
||||
|
||||
usb_set_intfdata (intf, se401);
|
||||
return 0;
|
||||
|
@ -1008,7 +1008,7 @@ static int sn9c102_stream_interrupt(struct sn9c102_device* cam)
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "URB timeout reached. The camera is misconfigured. "
|
||||
"To use it, close and open /dev/video%d again.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@ -1734,7 +1734,7 @@ static void sn9c102_release_resources(struct kref *kref)
|
||||
|
||||
cam = container_of(kref, struct sn9c102_device, kref);
|
||||
|
||||
DBG(2, "V4L2 device /dev/video%d deregistered", cam->v4ldev->minor);
|
||||
DBG(2, "V4L2 device /dev/video%d deregistered", cam->v4ldev->num);
|
||||
video_set_drvdata(cam->v4ldev, NULL);
|
||||
video_unregister_device(cam->v4ldev);
|
||||
usb_put_dev(cam->usbdev);
|
||||
@ -1792,7 +1792,7 @@ static int sn9c102_open(struct inode* inode, struct file* filp)
|
||||
|
||||
if (cam->users) {
|
||||
DBG(2, "Device /dev/video%d is already in use",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
DBG(3, "Simultaneous opens are not supported");
|
||||
/*
|
||||
open() must follow the open flags and should block
|
||||
@ -1845,7 +1845,7 @@ static int sn9c102_open(struct inode* inode, struct file* filp)
|
||||
cam->frame_count = 0;
|
||||
sn9c102_empty_framequeues(cam);
|
||||
|
||||
DBG(3, "Video device /dev/video%d is open", cam->v4ldev->minor);
|
||||
DBG(3, "Video device /dev/video%d is open", cam->v4ldev->num);
|
||||
|
||||
out:
|
||||
mutex_unlock(&cam->open_mutex);
|
||||
@ -1870,7 +1870,7 @@ static int sn9c102_release(struct inode* inode, struct file* filp)
|
||||
cam->users--;
|
||||
wake_up_interruptible_nr(&cam->wait_open, 1);
|
||||
|
||||
DBG(3, "Video device /dev/video%d closed", cam->v4ldev->minor);
|
||||
DBG(3, "Video device /dev/video%d closed", cam->v4ldev->num);
|
||||
|
||||
kref_put(&cam->kref, sn9c102_release_resources);
|
||||
|
||||
@ -2432,7 +2432,7 @@ sn9c102_vidioc_s_crop(struct sn9c102_device* cam, void __user * arg)
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "VIDIOC_S_CROP failed because of hardware problems. To "
|
||||
"use the camera, close and open /dev/video%d again.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@ -2445,7 +2445,7 @@ sn9c102_vidioc_s_crop(struct sn9c102_device* cam, void __user * arg)
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "VIDIOC_S_CROP failed because of not enough memory. To "
|
||||
"use the camera, close and open /dev/video%d again.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -2689,7 +2689,7 @@ sn9c102_vidioc_try_s_fmt(struct sn9c102_device* cam, unsigned int cmd,
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "VIDIOC_S_FMT failed because of hardware problems. To "
|
||||
"use the camera, close and open /dev/video%d again.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@ -2701,7 +2701,7 @@ sn9c102_vidioc_try_s_fmt(struct sn9c102_device* cam, unsigned int cmd,
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "VIDIOC_S_FMT failed because of not enough memory. To "
|
||||
"use the camera, close and open /dev/video%d again.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -2748,7 +2748,7 @@ sn9c102_vidioc_s_jpegcomp(struct sn9c102_device* cam, void __user * arg)
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "VIDIOC_S_JPEGCOMP failed because of hardware "
|
||||
"problems. To use the camera, close and open "
|
||||
"/dev/video%d again.", cam->v4ldev->minor);
|
||||
"/dev/video%d again.", cam->v4ldev->num);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@ -3348,7 +3348,7 @@ sn9c102_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
DBG(2, "V4L2 device registered as /dev/video%d", cam->v4ldev->minor);
|
||||
DBG(2, "V4L2 device registered as /dev/video%d", cam->v4ldev->num);
|
||||
|
||||
video_set_drvdata(cam->v4ldev, cam);
|
||||
cam->module_param.force_munmap = force_munmap[dev_nr];
|
||||
@ -3402,7 +3402,7 @@ static void sn9c102_usb_disconnect(struct usb_interface* intf)
|
||||
if (cam->users) {
|
||||
DBG(2, "Device /dev/video%d is open! Deregistration and "
|
||||
"memory deallocation are deferred.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
sn9c102_stop_transfer(cam);
|
||||
cam->state |= DEV_DISCONNECTED;
|
||||
|
@ -1331,7 +1331,7 @@ static int stk_register_video_device(struct stk_camera *dev)
|
||||
STK_ERROR("v4l registration failed\n");
|
||||
else
|
||||
STK_INFO("Syntek USB2.0 Camera is now controlling video device"
|
||||
" /dev/video%d\n", dev->vdev.minor);
|
||||
" /dev/video%d\n", dev->vdev.num);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -1426,7 +1426,7 @@ static void stk_camera_disconnect(struct usb_interface *interface)
|
||||
stk_remove_sysfs_files(&dev->vdev);
|
||||
|
||||
STK_INFO("Syntek USB2.0 Camera release resources "
|
||||
"video device /dev/video%d\n", dev->vdev.minor);
|
||||
"video device /dev/video%d\n", dev->vdev.num);
|
||||
|
||||
video_unregister_device(&dev->vdev);
|
||||
}
|
||||
|
@ -1470,7 +1470,8 @@ static int stv680_probe (struct usb_interface *intf, const struct usb_device_id
|
||||
retval = -EIO;
|
||||
goto error_vdev;
|
||||
}
|
||||
PDEBUG (0, "STV(i): registered new video device: video%d", stv680->vdev->minor);
|
||||
PDEBUG(0, "STV(i): registered new video device: video%d",
|
||||
stv680->vdev->num);
|
||||
|
||||
usb_set_intfdata (intf, stv680);
|
||||
retval = stv680_create_sysfs_files(stv680->vdev);
|
||||
|
@ -1059,7 +1059,7 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd)
|
||||
|
||||
dev_info(&uvd->dev->dev, "%s on /dev/video%d: canvas=%s videosize=%s\n",
|
||||
(uvd->handle != NULL) ? uvd->handle->drvName : "???",
|
||||
uvd->vdev.minor, tmp2, tmp1);
|
||||
uvd->vdev.num, tmp2, tmp1);
|
||||
|
||||
usb_get_dev(uvd->dev);
|
||||
return 0;
|
||||
|
@ -877,7 +877,8 @@ vicam_probe( struct usb_interface *intf, const struct usb_device_id *id)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
printk(KERN_INFO "ViCam webcam driver now controlling video device %d\n",cam->vdev.minor);
|
||||
printk(KERN_INFO "ViCam webcam driver now controlling video device %d\n",
|
||||
cam->vdev.num);
|
||||
|
||||
usb_set_intfdata (intf, cam);
|
||||
|
||||
|
@ -236,7 +236,7 @@ int usbvision_i2c_register(struct usb_usbvision *usbvision)
|
||||
sizeof(struct i2c_client));
|
||||
|
||||
sprintf(usbvision->i2c_adap.name + strlen(usbvision->i2c_adap.name),
|
||||
" #%d", usbvision->vdev->minor & 0x1f);
|
||||
" #%d", usbvision->vdev->num);
|
||||
PDEBUG(DBG_I2C,"Adaptername: %s", usbvision->i2c_adap.name);
|
||||
usbvision->i2c_adap.dev.parent = &usbvision->dev->dev;
|
||||
|
||||
|
@ -1440,7 +1440,7 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision)
|
||||
// vbi Device:
|
||||
if (usbvision->vbi) {
|
||||
PDEBUG(DBG_PROBE, "unregister /dev/vbi%d [v4l2]",
|
||||
usbvision->vbi->minor & 0x1f);
|
||||
usbvision->vbi->num);
|
||||
if (usbvision->vbi->minor != -1) {
|
||||
video_unregister_device(usbvision->vbi);
|
||||
} else {
|
||||
@ -1452,7 +1452,7 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision)
|
||||
// Radio Device:
|
||||
if (usbvision->rdev) {
|
||||
PDEBUG(DBG_PROBE, "unregister /dev/radio%d [v4l2]",
|
||||
usbvision->rdev->minor & 0x1f);
|
||||
usbvision->rdev->num);
|
||||
if (usbvision->rdev->minor != -1) {
|
||||
video_unregister_device(usbvision->rdev);
|
||||
} else {
|
||||
@ -1464,7 +1464,7 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision)
|
||||
// Video Device:
|
||||
if (usbvision->vdev) {
|
||||
PDEBUG(DBG_PROBE, "unregister /dev/video%d [v4l2]",
|
||||
usbvision->vdev->minor & 0x1f);
|
||||
usbvision->vdev->num);
|
||||
if (usbvision->vdev->minor != -1) {
|
||||
video_unregister_device(usbvision->vdev);
|
||||
} else {
|
||||
@ -1490,7 +1490,7 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision)
|
||||
goto err_exit;
|
||||
}
|
||||
printk(KERN_INFO "USBVision[%d]: registered USBVision Video device /dev/video%d [v4l2]\n",
|
||||
usbvision->nr,usbvision->vdev->minor & 0x1f);
|
||||
usbvision->nr, usbvision->vdev->num);
|
||||
|
||||
// Radio Device:
|
||||
if (usbvision_device_data[usbvision->DevModel].Radio) {
|
||||
@ -1507,7 +1507,7 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision)
|
||||
goto err_exit;
|
||||
}
|
||||
printk(KERN_INFO "USBVision[%d]: registered USBVision Radio device /dev/radio%d [v4l2]\n",
|
||||
usbvision->nr, usbvision->rdev->minor & 0x1f);
|
||||
usbvision->nr, usbvision->rdev->num);
|
||||
}
|
||||
// vbi Device:
|
||||
if (usbvision_device_data[usbvision->DevModel].vbi) {
|
||||
@ -1523,7 +1523,7 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision)
|
||||
goto err_exit;
|
||||
}
|
||||
printk(KERN_INFO "USBVision[%d]: registered USBVision VBI device /dev/vbi%d [v4l2] (Not Working Yet!)\n",
|
||||
usbvision->nr,usbvision->vbi->minor & 0x1f);
|
||||
usbvision->nr, usbvision->vbi->num);
|
||||
}
|
||||
// all done
|
||||
return 0;
|
||||
|
@ -1163,11 +1163,11 @@ static int vivi_release(void)
|
||||
|
||||
if (-1 != dev->vfd->minor) {
|
||||
printk(KERN_INFO "%s: unregistering /dev/video%d\n",
|
||||
VIVI_MODULE_NAME, dev->vfd->minor);
|
||||
VIVI_MODULE_NAME, dev->vfd->num);
|
||||
video_unregister_device(dev->vfd);
|
||||
} else {
|
||||
printk(KERN_INFO "%s: releasing /dev/video%d\n",
|
||||
VIVI_MODULE_NAME, dev->vfd->minor);
|
||||
VIVI_MODULE_NAME, dev->vfd->num);
|
||||
video_device_release(dev->vfd);
|
||||
}
|
||||
|
||||
@ -1307,7 +1307,7 @@ static int __init vivi_init(void)
|
||||
|
||||
dev->vfd = vfd;
|
||||
printk(KERN_INFO "%s: V4L2 device registered as /dev/video%d\n",
|
||||
VIVI_MODULE_NAME, vfd->minor);
|
||||
VIVI_MODULE_NAME, vfd->num);
|
||||
}
|
||||
|
||||
if (ret < 0) {
|
||||
|
@ -2398,7 +2398,7 @@ error:
|
||||
cam->sensor = CC_UNKNOWN;
|
||||
DBG(1, "Image sensor initialization failed for %s (/dev/video%d). "
|
||||
"Try to detach and attach this device again",
|
||||
symbolic(camlist, cam->id), cam->v4ldev->minor)
|
||||
symbolic(camlist, cam->id), cam->v4ldev->num)
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -2644,7 +2644,7 @@ static void w9968cf_release_resources(struct w9968cf_device* cam)
|
||||
{
|
||||
mutex_lock(&w9968cf_devlist_mutex);
|
||||
|
||||
DBG(2, "V4L device deregistered: /dev/video%d", cam->v4ldev->minor)
|
||||
DBG(2, "V4L device deregistered: /dev/video%d", cam->v4ldev->num)
|
||||
|
||||
video_unregister_device(cam->v4ldev);
|
||||
list_del(&cam->v4llist);
|
||||
@ -2679,7 +2679,7 @@ static int w9968cf_open(struct inode* inode, struct file* filp)
|
||||
DBG(2, "No supported image sensor has been detected by the "
|
||||
"'ovcamchip' module for the %s (/dev/video%d). Make "
|
||||
"sure it is loaded *before* (re)connecting the camera.",
|
||||
symbolic(camlist, cam->id), cam->v4ldev->minor)
|
||||
symbolic(camlist, cam->id), cam->v4ldev->num)
|
||||
mutex_unlock(&cam->dev_mutex);
|
||||
up_read(&w9968cf_disconnect);
|
||||
return -ENODEV;
|
||||
@ -2687,7 +2687,7 @@ static int w9968cf_open(struct inode* inode, struct file* filp)
|
||||
|
||||
if (cam->users) {
|
||||
DBG(2, "%s (/dev/video%d) has been already occupied by '%s'",
|
||||
symbolic(camlist, cam->id),cam->v4ldev->minor,cam->command)
|
||||
symbolic(camlist, cam->id), cam->v4ldev->num, cam->command)
|
||||
if ((filp->f_flags & O_NONBLOCK)||(filp->f_flags & O_NDELAY)) {
|
||||
mutex_unlock(&cam->dev_mutex);
|
||||
up_read(&w9968cf_disconnect);
|
||||
@ -2709,7 +2709,7 @@ static int w9968cf_open(struct inode* inode, struct file* filp)
|
||||
}
|
||||
|
||||
DBG(5, "Opening '%s', /dev/video%d ...",
|
||||
symbolic(camlist, cam->id), cam->v4ldev->minor)
|
||||
symbolic(camlist, cam->id), cam->v4ldev->num)
|
||||
|
||||
cam->streaming = 0;
|
||||
cam->misconfigured = 0;
|
||||
@ -2947,7 +2947,7 @@ static int w9968cf_v4l_ioctl(struct inode* inode, struct file* filp,
|
||||
.minheight = cam->minheight,
|
||||
};
|
||||
sprintf(cap.name, "W996[87]CF USB Camera #%d",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
cap.maxwidth = (cam->upscaling && w9968cf_vpp)
|
||||
? max((u16)W9968CF_MAX_WIDTH, cam->maxwidth)
|
||||
: cam->maxwidth;
|
||||
@ -3567,7 +3567,7 @@ w9968cf_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
DBG(2, "V4L device registered as /dev/video%d", cam->v4ldev->minor)
|
||||
DBG(2, "V4L device registered as /dev/video%d", cam->v4ldev->num)
|
||||
|
||||
/* Set some basic constants */
|
||||
w9968cf_configure_camera(cam, udev, mod_id, dev_nr);
|
||||
@ -3618,7 +3618,7 @@ static void w9968cf_usb_disconnect(struct usb_interface* intf)
|
||||
DBG(2, "The device is open (/dev/video%d)! "
|
||||
"Process name: %s. Deregistration and memory "
|
||||
"deallocation are deferred on close.",
|
||||
cam->v4ldev->minor, cam->command)
|
||||
cam->v4ldev->num, cam->command)
|
||||
cam->misconfigured = 1;
|
||||
w9968cf_stop_transfer(cam);
|
||||
wake_up_interruptible(&cam->wait_queue);
|
||||
|
@ -539,7 +539,7 @@ static int zc0301_stream_interrupt(struct zc0301_device* cam)
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "URB timeout reached. The camera is misconfigured. To "
|
||||
"use it, close and open /dev/video%d again.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@ -640,7 +640,7 @@ static void zc0301_release_resources(struct kref *kref)
|
||||
{
|
||||
struct zc0301_device *cam = container_of(kref, struct zc0301_device,
|
||||
kref);
|
||||
DBG(2, "V4L2 device /dev/video%d deregistered", cam->v4ldev->minor);
|
||||
DBG(2, "V4L2 device /dev/video%d deregistered", cam->v4ldev->num);
|
||||
video_set_drvdata(cam->v4ldev, NULL);
|
||||
video_unregister_device(cam->v4ldev);
|
||||
usb_put_dev(cam->usbdev);
|
||||
@ -679,7 +679,7 @@ static int zc0301_open(struct inode* inode, struct file* filp)
|
||||
}
|
||||
|
||||
if (cam->users) {
|
||||
DBG(2, "Device /dev/video%d is busy...", cam->v4ldev->minor);
|
||||
DBG(2, "Device /dev/video%d is busy...", cam->v4ldev->num);
|
||||
DBG(3, "Simultaneous opens are not supported");
|
||||
if ((filp->f_flags & O_NONBLOCK) ||
|
||||
(filp->f_flags & O_NDELAY)) {
|
||||
@ -722,7 +722,7 @@ static int zc0301_open(struct inode* inode, struct file* filp)
|
||||
cam->frame_count = 0;
|
||||
zc0301_empty_framequeues(cam);
|
||||
|
||||
DBG(3, "Video device /dev/video%d is open", cam->v4ldev->minor);
|
||||
DBG(3, "Video device /dev/video%d is open", cam->v4ldev->num);
|
||||
|
||||
out:
|
||||
mutex_unlock(&cam->open_mutex);
|
||||
@ -746,7 +746,7 @@ static int zc0301_release(struct inode* inode, struct file* filp)
|
||||
cam->users--;
|
||||
wake_up_interruptible_nr(&cam->wait_open, 1);
|
||||
|
||||
DBG(3, "Video device /dev/video%d closed", cam->v4ldev->minor);
|
||||
DBG(3, "Video device /dev/video%d closed", cam->v4ldev->num);
|
||||
|
||||
kref_put(&cam->kref, zc0301_release_resources);
|
||||
|
||||
@ -1275,7 +1275,7 @@ zc0301_vidioc_s_crop(struct zc0301_device* cam, void __user * arg)
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "VIDIOC_S_CROP failed because of hardware problems. To "
|
||||
"use the camera, close and open /dev/video%d again.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@ -1288,7 +1288,7 @@ zc0301_vidioc_s_crop(struct zc0301_device* cam, void __user * arg)
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "VIDIOC_S_CROP failed because of not enough memory. To "
|
||||
"use the camera, close and open /dev/video%d again.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -1470,7 +1470,7 @@ zc0301_vidioc_try_s_fmt(struct zc0301_device* cam, unsigned int cmd,
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "VIDIOC_S_FMT failed because of hardware problems. To "
|
||||
"use the camera, close and open /dev/video%d again.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@ -1482,7 +1482,7 @@ zc0301_vidioc_try_s_fmt(struct zc0301_device* cam, unsigned int cmd,
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "VIDIOC_S_FMT failed because of not enough memory. To "
|
||||
"use the camera, close and open /dev/video%d again.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -1529,7 +1529,7 @@ zc0301_vidioc_s_jpegcomp(struct zc0301_device* cam, void __user * arg)
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
DBG(1, "VIDIOC_S_JPEGCOMP failed because of hardware "
|
||||
"problems. To use the camera, close and open "
|
||||
"/dev/video%d again.", cam->v4ldev->minor);
|
||||
"/dev/video%d again.", cam->v4ldev->num);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@ -2005,7 +2005,7 @@ zc0301_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
DBG(2, "V4L2 device registered as /dev/video%d", cam->v4ldev->minor);
|
||||
DBG(2, "V4L2 device registered as /dev/video%d", cam->v4ldev->num);
|
||||
|
||||
cam->module_param.force_munmap = force_munmap[dev_nr];
|
||||
cam->module_param.frame_timeout = frame_timeout[dev_nr];
|
||||
@ -2044,7 +2044,7 @@ static void zc0301_usb_disconnect(struct usb_interface* intf)
|
||||
if (cam->users) {
|
||||
DBG(2, "Device /dev/video%d is open! Deregistration and "
|
||||
"memory deallocation are deferred.",
|
||||
cam->v4ldev->minor);
|
||||
cam->v4ldev->num);
|
||||
cam->state |= DEV_MISCONFIGURED;
|
||||
zc0301_stop_transfer(cam);
|
||||
cam->state |= DEV_DISCONNECTED;
|
||||
|
@ -885,7 +885,7 @@ static int zr364xx_probe(struct usb_interface *intf,
|
||||
usb_set_intfdata(intf, cam);
|
||||
|
||||
dev_info(&udev->dev, DRIVER_DESC " controlling video device %d\n",
|
||||
cam->vdev->minor);
|
||||
cam->vdev->num);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user