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/w9968cf.c | |
parent | 323a491a29d0bb1e91263ca347cb42c4de28adfc (diff) | |
download | blackbird-op-linux-c6330fb86fd0fed98b7e0d5792881a77b778fefc.tar.gz blackbird-op-linux-c6330fb86fd0fed98b7e0d5792881a77b778fefc.zip |
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/w9968cf.c')
-rw-r--r-- | drivers/media/video/w9968cf.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/w9968cf.c b/drivers/media/video/w9968cf.c index dcd45dbd82dc..4dfb43bd1846 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); |