diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-10-19 17:54:26 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-21 12:31:37 -0400 |
commit | c6330fb86fd0fed98b7e0d5792881a77b778fefc (patch) | |
tree | 3c87d6fa7053963cfdea592a2956b28354ce0832 /drivers/media/video/w9968cf.c | |
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/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: | |||
2398 | cam->sensor = CC_UNKNOWN; | 2398 | cam->sensor = CC_UNKNOWN; |
2399 | DBG(1, "Image sensor initialization failed for %s (/dev/video%d). " | 2399 | DBG(1, "Image sensor initialization failed for %s (/dev/video%d). " |
2400 | "Try to detach and attach this device again", | 2400 | "Try to detach and attach this device again", |
2401 | symbolic(camlist, cam->id), cam->v4ldev->minor) | 2401 | symbolic(camlist, cam->id), cam->v4ldev->num) |
2402 | return err; | 2402 | return err; |
2403 | } | 2403 | } |
2404 | 2404 | ||
@@ -2644,7 +2644,7 @@ static void w9968cf_release_resources(struct w9968cf_device* cam) | |||
2644 | { | 2644 | { |
2645 | mutex_lock(&w9968cf_devlist_mutex); | 2645 | mutex_lock(&w9968cf_devlist_mutex); |
2646 | 2646 | ||
2647 | DBG(2, "V4L device deregistered: /dev/video%d", cam->v4ldev->minor) | 2647 | DBG(2, "V4L device deregistered: /dev/video%d", cam->v4ldev->num) |
2648 | 2648 | ||
2649 | video_unregister_device(cam->v4ldev); | 2649 | video_unregister_device(cam->v4ldev); |
2650 | list_del(&cam->v4llist); | 2650 | list_del(&cam->v4llist); |
@@ -2679,7 +2679,7 @@ static int w9968cf_open(struct inode* inode, struct file* filp) | |||
2679 | DBG(2, "No supported image sensor has been detected by the " | 2679 | DBG(2, "No supported image sensor has been detected by the " |
2680 | "'ovcamchip' module for the %s (/dev/video%d). Make " | 2680 | "'ovcamchip' module for the %s (/dev/video%d). Make " |
2681 | "sure it is loaded *before* (re)connecting the camera.", | 2681 | "sure it is loaded *before* (re)connecting the camera.", |
2682 | symbolic(camlist, cam->id), cam->v4ldev->minor) | 2682 | symbolic(camlist, cam->id), cam->v4ldev->num) |
2683 | mutex_unlock(&cam->dev_mutex); | 2683 | mutex_unlock(&cam->dev_mutex); |
2684 | up_read(&w9968cf_disconnect); | 2684 | up_read(&w9968cf_disconnect); |
2685 | return -ENODEV; | 2685 | return -ENODEV; |
@@ -2687,7 +2687,7 @@ static int w9968cf_open(struct inode* inode, struct file* filp) | |||
2687 | 2687 | ||
2688 | if (cam->users) { | 2688 | if (cam->users) { |
2689 | DBG(2, "%s (/dev/video%d) has been already occupied by '%s'", | 2689 | DBG(2, "%s (/dev/video%d) has been already occupied by '%s'", |
2690 | symbolic(camlist, cam->id),cam->v4ldev->minor,cam->command) | 2690 | symbolic(camlist, cam->id), cam->v4ldev->num, cam->command) |
2691 | if ((filp->f_flags & O_NONBLOCK)||(filp->f_flags & O_NDELAY)) { | 2691 | if ((filp->f_flags & O_NONBLOCK)||(filp->f_flags & O_NDELAY)) { |
2692 | mutex_unlock(&cam->dev_mutex); | 2692 | mutex_unlock(&cam->dev_mutex); |
2693 | up_read(&w9968cf_disconnect); | 2693 | up_read(&w9968cf_disconnect); |
@@ -2709,7 +2709,7 @@ static int w9968cf_open(struct inode* inode, struct file* filp) | |||
2709 | } | 2709 | } |
2710 | 2710 | ||
2711 | DBG(5, "Opening '%s', /dev/video%d ...", | 2711 | DBG(5, "Opening '%s', /dev/video%d ...", |
2712 | symbolic(camlist, cam->id), cam->v4ldev->minor) | 2712 | symbolic(camlist, cam->id), cam->v4ldev->num) |
2713 | 2713 | ||
2714 | cam->streaming = 0; | 2714 | cam->streaming = 0; |
2715 | cam->misconfigured = 0; | 2715 | cam->misconfigured = 0; |
@@ -2947,7 +2947,7 @@ static int w9968cf_v4l_ioctl(struct inode* inode, struct file* filp, | |||
2947 | .minheight = cam->minheight, | 2947 | .minheight = cam->minheight, |
2948 | }; | 2948 | }; |
2949 | sprintf(cap.name, "W996[87]CF USB Camera #%d", | 2949 | sprintf(cap.name, "W996[87]CF USB Camera #%d", |
2950 | cam->v4ldev->minor); | 2950 | cam->v4ldev->num); |
2951 | cap.maxwidth = (cam->upscaling && w9968cf_vpp) | 2951 | cap.maxwidth = (cam->upscaling && w9968cf_vpp) |
2952 | ? max((u16)W9968CF_MAX_WIDTH, cam->maxwidth) | 2952 | ? max((u16)W9968CF_MAX_WIDTH, cam->maxwidth) |
2953 | : cam->maxwidth; | 2953 | : cam->maxwidth; |
@@ -3567,7 +3567,7 @@ w9968cf_usb_probe(struct usb_interface* intf, const struct usb_device_id* id) | |||
3567 | goto fail; | 3567 | goto fail; |
3568 | } | 3568 | } |
3569 | 3569 | ||
3570 | DBG(2, "V4L device registered as /dev/video%d", cam->v4ldev->minor) | 3570 | DBG(2, "V4L device registered as /dev/video%d", cam->v4ldev->num) |
3571 | 3571 | ||
3572 | /* Set some basic constants */ | 3572 | /* Set some basic constants */ |
3573 | w9968cf_configure_camera(cam, udev, mod_id, dev_nr); | 3573 | w9968cf_configure_camera(cam, udev, mod_id, dev_nr); |
@@ -3618,7 +3618,7 @@ static void w9968cf_usb_disconnect(struct usb_interface* intf) | |||
3618 | DBG(2, "The device is open (/dev/video%d)! " | 3618 | DBG(2, "The device is open (/dev/video%d)! " |
3619 | "Process name: %s. Deregistration and memory " | 3619 | "Process name: %s. Deregistration and memory " |
3620 | "deallocation are deferred on close.", | 3620 | "deallocation are deferred on close.", |
3621 | cam->v4ldev->minor, cam->command) | 3621 | cam->v4ldev->num, cam->command) |
3622 | cam->misconfigured = 1; | 3622 | cam->misconfigured = 1; |
3623 | w9968cf_stop_transfer(cam); | 3623 | w9968cf_stop_transfer(cam); |
3624 | wake_up_interruptible(&cam->wait_queue); | 3624 | wake_up_interruptible(&cam->wait_queue); |