aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/et61x251
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2009-11-27 11:57:15 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-15 21:17:55 -0500
commit38c7c036036c6260606a2a833aaad3794ca22499 (patch)
tree8a41bf5b665a5ba328102e802fc4c7471270b428 /drivers/media/video/et61x251
parenteac8ea536aded07004bde917f05a2329902c64b0 (diff)
V4L/DVB (13550): v4l: Use the new video_device_node_name function
Fix all device drivers to use the new video_device_node_name function. This also strips kernel log messages from the "/dev/" prefix, has the device node location is a userspace policy decision unknown to the kernel. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/et61x251')
-rw-r--r--drivers/media/video/et61x251/et61x251_core.c44
1 files changed, 24 insertions, 20 deletions
diff --git a/drivers/media/video/et61x251/et61x251_core.c b/drivers/media/video/et61x251/et61x251_core.c
index 88987a57cf7b..f561a1c86791 100644
--- a/drivers/media/video/et61x251/et61x251_core.c
+++ b/drivers/media/video/et61x251/et61x251_core.c
@@ -587,8 +587,8 @@ static int et61x251_stream_interrupt(struct et61x251_device* cam)
587 else if (cam->stream != STREAM_OFF) { 587 else if (cam->stream != STREAM_OFF) {
588 cam->state |= DEV_MISCONFIGURED; 588 cam->state |= DEV_MISCONFIGURED;
589 DBG(1, "URB timeout reached. The camera is misconfigured. To " 589 DBG(1, "URB timeout reached. The camera is misconfigured. To "
590 "use it, close and open /dev/video%d again.", 590 "use it, close and open %s again.",
591 cam->v4ldev->num); 591 video_device_node_name(cam->v4ldev));
592 return -EIO; 592 return -EIO;
593 } 593 }
594 594
@@ -1195,7 +1195,8 @@ static void et61x251_release_resources(struct kref *kref)
1195 1195
1196 cam = container_of(kref, struct et61x251_device, kref); 1196 cam = container_of(kref, struct et61x251_device, kref);
1197 1197
1198 DBG(2, "V4L2 device /dev/video%d deregistered", cam->v4ldev->num); 1198 DBG(2, "V4L2 device %s deregistered",
1199 video_device_node_name(cam->v4ldev));
1199 video_set_drvdata(cam->v4ldev, NULL); 1200 video_set_drvdata(cam->v4ldev, NULL);
1200 video_unregister_device(cam->v4ldev); 1201 video_unregister_device(cam->v4ldev);
1201 usb_put_dev(cam->usbdev); 1202 usb_put_dev(cam->usbdev);
@@ -1236,8 +1237,8 @@ static int et61x251_open(struct file *filp)
1236 } 1237 }
1237 1238
1238 if (cam->users) { 1239 if (cam->users) {
1239 DBG(2, "Device /dev/video%d is already in use", 1240 DBG(2, "Device %s is already in use",
1240 cam->v4ldev->num); 1241 video_device_node_name(cam->v4ldev));
1241 DBG(3, "Simultaneous opens are not supported"); 1242 DBG(3, "Simultaneous opens are not supported");
1242 if ((filp->f_flags & O_NONBLOCK) || 1243 if ((filp->f_flags & O_NONBLOCK) ||
1243 (filp->f_flags & O_NDELAY)) { 1244 (filp->f_flags & O_NDELAY)) {
@@ -1280,7 +1281,8 @@ static int et61x251_open(struct file *filp)
1280 cam->frame_count = 0; 1281 cam->frame_count = 0;
1281 et61x251_empty_framequeues(cam); 1282 et61x251_empty_framequeues(cam);
1282 1283
1283 DBG(3, "Video device /dev/video%d is open", cam->v4ldev->num); 1284 DBG(3, "Video device %s is open",
1285 video_device_node_name(cam->v4ldev));
1284 1286
1285out: 1287out:
1286 mutex_unlock(&cam->open_mutex); 1288 mutex_unlock(&cam->open_mutex);
@@ -1304,7 +1306,8 @@ static int et61x251_release(struct file *filp)
1304 cam->users--; 1306 cam->users--;
1305 wake_up_interruptible_nr(&cam->wait_open, 1); 1307 wake_up_interruptible_nr(&cam->wait_open, 1);
1306 1308
1307 DBG(3, "Video device /dev/video%d closed", cam->v4ldev->num); 1309 DBG(3, "Video device %s closed",
1310 video_device_node_name(cam->v4ldev));
1308 1311
1309 kref_put(&cam->kref, et61x251_release_resources); 1312 kref_put(&cam->kref, et61x251_release_resources);
1310 1313
@@ -1846,8 +1849,8 @@ et61x251_vidioc_s_crop(struct et61x251_device* cam, void __user * arg)
1846 if (err) { /* atomic, no rollback in ioctl() */ 1849 if (err) { /* atomic, no rollback in ioctl() */
1847 cam->state |= DEV_MISCONFIGURED; 1850 cam->state |= DEV_MISCONFIGURED;
1848 DBG(1, "VIDIOC_S_CROP failed because of hardware problems. To " 1851 DBG(1, "VIDIOC_S_CROP failed because of hardware problems. To "
1849 "use the camera, close and open /dev/video%d again.", 1852 "use the camera, close and open %s again.",
1850 cam->v4ldev->num); 1853 video_device_node_name(cam->v4ldev));
1851 return -EIO; 1854 return -EIO;
1852 } 1855 }
1853 1856
@@ -1859,8 +1862,8 @@ et61x251_vidioc_s_crop(struct et61x251_device* cam, void __user * arg)
1859 nbuffers != et61x251_request_buffers(cam, nbuffers, cam->io)) { 1862 nbuffers != et61x251_request_buffers(cam, nbuffers, cam->io)) {
1860 cam->state |= DEV_MISCONFIGURED; 1863 cam->state |= DEV_MISCONFIGURED;
1861 DBG(1, "VIDIOC_S_CROP failed because of not enough memory. To " 1864 DBG(1, "VIDIOC_S_CROP failed because of not enough memory. To "
1862 "use the camera, close and open /dev/video%d again.", 1865 "use the camera, close and open %s again.",
1863 cam->v4ldev->num); 1866 video_device_node_name(cam->v4ldev));
1864 return -ENOMEM; 1867 return -ENOMEM;
1865 } 1868 }
1866 1869
@@ -2069,8 +2072,8 @@ et61x251_vidioc_try_s_fmt(struct et61x251_device* cam, unsigned int cmd,
2069 if (err) { /* atomic, no rollback in ioctl() */ 2072 if (err) { /* atomic, no rollback in ioctl() */
2070 cam->state |= DEV_MISCONFIGURED; 2073 cam->state |= DEV_MISCONFIGURED;
2071 DBG(1, "VIDIOC_S_FMT failed because of hardware problems. To " 2074 DBG(1, "VIDIOC_S_FMT failed because of hardware problems. To "
2072 "use the camera, close and open /dev/video%d again.", 2075 "use the camera, close and open %s again.",
2073 cam->v4ldev->num); 2076 video_device_node_name(cam->v4ldev));
2074 return -EIO; 2077 return -EIO;
2075 } 2078 }
2076 2079
@@ -2081,8 +2084,8 @@ et61x251_vidioc_try_s_fmt(struct et61x251_device* cam, unsigned int cmd,
2081 nbuffers != et61x251_request_buffers(cam, nbuffers, cam->io)) { 2084 nbuffers != et61x251_request_buffers(cam, nbuffers, cam->io)) {
2082 cam->state |= DEV_MISCONFIGURED; 2085 cam->state |= DEV_MISCONFIGURED;
2083 DBG(1, "VIDIOC_S_FMT failed because of not enough memory. To " 2086 DBG(1, "VIDIOC_S_FMT failed because of not enough memory. To "
2084 "use the camera, close and open /dev/video%d again.", 2087 "use the camera, close and open %s again.",
2085 cam->v4ldev->num); 2088 video_device_node_name(cam->v4ldev));
2086 return -ENOMEM; 2089 return -ENOMEM;
2087 } 2090 }
2088 2091
@@ -2130,7 +2133,7 @@ et61x251_vidioc_s_jpegcomp(struct et61x251_device* cam, void __user * arg)
2130 cam->state |= DEV_MISCONFIGURED; 2133 cam->state |= DEV_MISCONFIGURED;
2131 DBG(1, "VIDIOC_S_JPEGCOMP failed because of hardware " 2134 DBG(1, "VIDIOC_S_JPEGCOMP failed because of hardware "
2132 "problems. To use the camera, close and open " 2135 "problems. To use the camera, close and open "
2133 "/dev/video%d again.", cam->v4ldev->num); 2136 "%s again.", video_device_node_name(cam->v4ldev));
2134 return -EIO; 2137 return -EIO;
2135 } 2138 }
2136 2139
@@ -2603,7 +2606,8 @@ et61x251_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
2603 goto fail; 2606 goto fail;
2604 } 2607 }
2605 2608
2606 DBG(2, "V4L2 device registered as /dev/video%d", cam->v4ldev->num); 2609 DBG(2, "V4L2 device registered as %s",
2610 video_device_node_name(cam->v4ldev));
2607 2611
2608 cam->module_param.force_munmap = force_munmap[dev_nr]; 2612 cam->module_param.force_munmap = force_munmap[dev_nr];
2609 cam->module_param.frame_timeout = frame_timeout[dev_nr]; 2613 cam->module_param.frame_timeout = frame_timeout[dev_nr];
@@ -2654,9 +2658,9 @@ static void et61x251_usb_disconnect(struct usb_interface* intf)
2654 DBG(2, "Disconnecting %s...", cam->v4ldev->name); 2658 DBG(2, "Disconnecting %s...", cam->v4ldev->name);
2655 2659
2656 if (cam->users) { 2660 if (cam->users) {
2657 DBG(2, "Device /dev/video%d is open! Deregistration and " 2661 DBG(2, "Device %s is open! Deregistration and memory "
2658 "memory deallocation are deferred.", 2662 "deallocation are deferred.",
2659 cam->v4ldev->num); 2663 video_device_node_name(cam->v4ldev));
2660 cam->state |= DEV_MISCONFIGURED; 2664 cam->state |= DEV_MISCONFIGURED;
2661 et61x251_stop_transfer(cam); 2665 et61x251_stop_transfer(cam);
2662 cam->state |= DEV_DISCONNECTED; 2666 cam->state |= DEV_DISCONNECTED;