diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-10-19 18:54:26 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-21 14:31:37 -0200 |
commit | c6330fb86fd0fed98b7e0d5792881a77b778fefc (patch) | |
tree | 3c87d6fa7053963cfdea592a2956b28354ce0832 /drivers/media/video | |
parent | 323a491a29d0bb1e91263ca347cb42c4de28adfc (diff) |
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>
Diffstat (limited to 'drivers/media/video')
28 files changed, 89 insertions, 87 deletions
diff --git a/drivers/media/video/arv.c b/drivers/media/video/arv.c index 218754b4906..e09b0069323 100644 --- a/drivers/media/video/arv.c +++ b/drivers/media/video/arv.c @@ -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; diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 5858bf5ff41..9ec4cec2e52 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c @@ -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; diff --git a/drivers/media/video/c-qcam.c b/drivers/media/video/c-qcam.c index 17aa0adb346..0f930d35146 100644 --- a/drivers/media/video/c-qcam.c +++ b/drivers/media/video/c-qcam.c @@ -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; diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c index fc9497bdd32..a8c068e1de1 100644 --- a/drivers/media/video/cafe_ccic.c +++ b/drivers/media/video/cafe_ccic.c @@ -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); } diff --git a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c index 1798b779a25..16c094f7785 100644 --- a/drivers/media/video/cpia.c +++ b/drivers/media/video/cpia.c @@ -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) { diff --git a/drivers/media/video/cpia2/cpia2_v4l.c b/drivers/media/video/cpia2/cpia2_v4l.c index 897e8d1a5c3..1c6bd633f19 100644 --- a/drivers/media/video/cpia2/cpia2_v4l.c +++ b/drivers/media/video/cpia2/cpia2_v4l.c @@ -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); } } diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c index 395c11fa47c..00831f3ef8f 100644 --- a/drivers/media/video/cx23885/cx23885-417.c +++ b/drivers/media/video/cx23885/cx23885-417.c @@ -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; } diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c index ab3110d6046..c742a10be5c 100644 --- a/drivers/media/video/cx23885/cx23885-video.c +++ b/drivers/media/video/cx23885/cx23885-video.c @@ -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); diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index e7136975430..078be631955 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c @@ -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; } diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 3904b73f52e..61265fd04d5 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c @@ -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 */ diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index c53649e5315..a1ab2ef4557 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c @@ -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 */ diff --git a/drivers/media/video/et61x251/et61x251_core.c b/drivers/media/video/et61x251/et61x251_core.c index 7a85c41b0ee..9d0ef96c23f 100644 --- a/drivers/media/video/et61x251/et61x251_core.c +++ b/drivers/media/video/et61x251/et61x251_core.c @@ -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; diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index f048d80b77e..43ef7ba75c8 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c @@ -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, diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index ab28389b4cd..f3897a3fdb7 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c @@ -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 */ diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index b686bfabbde..24918445294 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c @@ -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 */ diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index 9a8766a78a0..7f40511bcc0 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c @@ -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, diff --git a/drivers/media/video/se401.c b/drivers/media/video/se401.c index ae3949180c4..044a2e94c34 100644 --- a/drivers/media/video/se401.c +++ b/drivers/media/video/se401.c @@ -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; diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c index 20e30bd9364..fcd2b62f92c 100644 --- a/drivers/media/video/sn9c102/sn9c102_core.c +++ b/drivers/media/video/sn9c102/sn9c102_core.c @@ -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; diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c index edaea496451..e9eb6d754d5 100644 --- a/drivers/media/video/stk-webcam.c +++ b/drivers/media/video/stk-webcam.c @@ -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); } diff --git a/drivers/media/video/stv680.c b/drivers/media/video/stv680.c index 9c549d93599..328c41b1517 100644 --- a/drivers/media/video/stv680.c +++ b/drivers/media/video/stv680.c @@ -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); diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c index 07cd87d16f6..7c575bb8184 100644 --- a/drivers/media/video/usbvideo/usbvideo.c +++ b/drivers/media/video/usbvideo/usbvideo.c @@ -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; diff --git a/drivers/media/video/usbvideo/vicam.c b/drivers/media/video/usbvideo/vicam.c index 7a127d6bfde..8e2d58bec48 100644 --- a/drivers/media/video/usbvideo/vicam.c +++ b/drivers/media/video/usbvideo/vicam.c @@ -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); diff --git a/drivers/media/video/usbvision/usbvision-i2c.c b/drivers/media/video/usbvision/usbvision-i2c.c index 92427fdc145..9907b9aff2b 100644 --- a/drivers/media/video/usbvision/usbvision-i2c.c +++ b/drivers/media/video/usbvision/usbvision-i2c.c @@ -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; diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c index 77aeb39b275..d185b57fdcd 100644 --- a/drivers/media/video/usbvision/usbvision-video.c +++ b/drivers/media/video/usbvision/usbvision-video.c @@ -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; diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index 7d7e51def46..e15e48f04be 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c @@ -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) { diff --git a/drivers/media/video/w9968cf.c b/drivers/media/video/w9968cf.c index dcd45dbd82d..4dfb43bd184 100644 --- a/drivers/media/video/w9968cf.c +++ b/drivers/media/video/w9968cf.c @@ -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); diff --git a/drivers/media/video/zc0301/zc0301_core.c b/drivers/media/video/zc0301/zc0301_core.c index 6a0902bcba6..9fc58170763 100644 --- a/drivers/media/video/zc0301/zc0301_core.c +++ b/drivers/media/video/zc0301/zc0301_core.c @@ -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; diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c index 7cdac99deea..a1d81ed44c7 100644 --- a/drivers/media/video/zr364xx.c +++ b/drivers/media/video/zr364xx.c @@ -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; } |