aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
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
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')
-rw-r--r--drivers/media/common/saa7146_fops.c12
-rw-r--r--drivers/media/video/arv.c4
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c12
-rw-r--r--drivers/media/video/c-qcam.c4
-rw-r--r--drivers/media/video/cpia.c13
-rw-r--r--drivers/media/video/cpia2/cpia2_v4l.c6
-rw-r--r--drivers/media/video/cx18/cx18-streams.c20
-rw-r--r--drivers/media/video/cx231xx/cx231xx-cards.c5
-rw-r--r--drivers/media/video/cx231xx/cx231xx-video.c25
-rw-r--r--drivers/media/video/cx23885/cx23885-417.c4
-rw-r--r--drivers/media/video/cx23885/cx23885-video.c4
-rw-r--r--drivers/media/video/cx88/cx88-blackbird.c4
-rw-r--r--drivers/media/video/cx88/cx88-video.c12
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c4
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c20
-rw-r--r--drivers/media/video/et61x251/et61x251_core.c44
-rw-r--r--drivers/media/video/gspca/gl860/gl860.c4
-rw-r--r--drivers/media/video/gspca/gspca.c8
-rw-r--r--drivers/media/video/hdpvr/hdpvr-core.c10
-rw-r--r--drivers/media/video/ivtv/ivtv-streams.c19
-rw-r--r--drivers/media/video/omap24xxcam.c3
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-v4l2.c21
-rw-r--r--drivers/media/video/pwc/pwc-if.c2
-rw-r--r--drivers/media/video/saa7134/saa7134-core.c12
-rw-r--r--drivers/media/video/saa7134/saa7134-empress.c4
-rw-r--r--drivers/media/video/se401.c4
-rw-r--r--drivers/media/video/sn9c102/sn9c102_core.c46
-rw-r--r--drivers/media/video/stk-webcam.c8
-rw-r--r--drivers/media/video/stv680.c4
-rw-r--r--drivers/media/video/usbvideo/usbvideo.c4
-rw-r--r--drivers/media/video/usbvideo/vicam.c4
-rw-r--r--drivers/media/video/usbvision/usbvision-video.c24
-rw-r--r--drivers/media/video/vivi.c11
-rw-r--r--drivers/media/video/w9968cf.c30
-rw-r--r--drivers/media/video/zc0301/zc0301_core.c43
-rw-r--r--drivers/media/video/zr364xx.c4
-rw-r--r--drivers/staging/go7007/go7007-v4l2.c4
37 files changed, 231 insertions, 231 deletions
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c
index 620f655fa9c5..f279a6440415 100644
--- a/drivers/media/common/saa7146_fops.c
+++ b/drivers/media/common/saa7146_fops.c
@@ -543,15 +543,13 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
543 return err; 543 return err;
544 } 544 }
545 545
546 if( VFL_TYPE_GRABBER == type ) { 546 if (VFL_TYPE_GRABBER == type)
547 vv->video_minor = vfd->minor; 547 vv->video_minor = vfd->minor;
548 INFO(("%s: registered device video%d [v4l2]\n", 548 else
549 dev->name, vfd->num));
550 } else {
551 vv->vbi_minor = vfd->minor; 549 vv->vbi_minor = vfd->minor;
552 INFO(("%s: registered device vbi%d [v4l2]\n", 550
553 dev->name, vfd->num)); 551 INFO(("%s: registered device %s [v4l2]\n",
554 } 552 dev->name, video_device_node_name(vfd)));
555 553
556 *vid = vfd; 554 *vid = vfd;
557 return 0; 555 return 0;
diff --git a/drivers/media/video/arv.c b/drivers/media/video/arv.c
index d137bac84511..0ec807d82795 100644
--- a/drivers/media/video/arv.c
+++ b/drivers/media/video/arv.c
@@ -860,8 +860,8 @@ static int __init ar_init(void)
860 goto out_dev; 860 goto out_dev;
861 } 861 }
862 862
863 printk("video%d: Found M64278 VGA (IRQ %d, Freq %dMHz).\n", 863 printk("%s: Found M64278 VGA (IRQ %d, Freq %dMHz).\n",
864 ar->vdev->num, M32R_IRQ_INT3, freq); 864 video_device_node_name(ar->vdev), M32R_IRQ_INT3, freq);
865 865
866 return 0; 866 return 0;
867 867
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index a6724019c66f..d57618319896 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -4244,8 +4244,8 @@ static int __devinit bttv_register_video(struct bttv *btv)
4244 if (video_register_device(btv->video_dev, VFL_TYPE_GRABBER, 4244 if (video_register_device(btv->video_dev, VFL_TYPE_GRABBER,
4245 video_nr[btv->c.nr]) < 0) 4245 video_nr[btv->c.nr]) < 0)
4246 goto err; 4246 goto err;
4247 printk(KERN_INFO "bttv%d: registered device video%d\n", 4247 printk(KERN_INFO "bttv%d: registered device %s\n",
4248 btv->c.nr, btv->video_dev->num); 4248 btv->c.nr, video_device_node_name(btv->video_dev));
4249 if (device_create_file(&btv->video_dev->dev, 4249 if (device_create_file(&btv->video_dev->dev,
4250 &dev_attr_card)<0) { 4250 &dev_attr_card)<0) {
4251 printk(KERN_ERR "bttv%d: device_create_file 'card' " 4251 printk(KERN_ERR "bttv%d: device_create_file 'card' "
@@ -4261,8 +4261,8 @@ static int __devinit bttv_register_video(struct bttv *btv)
4261 if (video_register_device(btv->vbi_dev, VFL_TYPE_VBI, 4261 if (video_register_device(btv->vbi_dev, VFL_TYPE_VBI,
4262 vbi_nr[btv->c.nr]) < 0) 4262 vbi_nr[btv->c.nr]) < 0)
4263 goto err; 4263 goto err;
4264 printk(KERN_INFO "bttv%d: registered device vbi%d\n", 4264 printk(KERN_INFO "bttv%d: registered device %s\n",
4265 btv->c.nr, btv->vbi_dev->num); 4265 btv->c.nr, video_device_node_name(btv->vbi_dev));
4266 4266
4267 if (!btv->has_radio) 4267 if (!btv->has_radio)
4268 return 0; 4268 return 0;
@@ -4273,8 +4273,8 @@ static int __devinit bttv_register_video(struct bttv *btv)
4273 if (video_register_device(btv->radio_dev, VFL_TYPE_RADIO, 4273 if (video_register_device(btv->radio_dev, VFL_TYPE_RADIO,
4274 radio_nr[btv->c.nr]) < 0) 4274 radio_nr[btv->c.nr]) < 0)
4275 goto err; 4275 goto err;
4276 printk(KERN_INFO "bttv%d: registered device radio%d\n", 4276 printk(KERN_INFO "bttv%d: registered device %s\n",
4277 btv->c.nr, btv->radio_dev->num); 4277 btv->c.nr, video_device_node_name(btv->radio_dev));
4278 4278
4279 /* all done */ 4279 /* all done */
4280 return 0; 4280 return 0;
diff --git a/drivers/media/video/c-qcam.c b/drivers/media/video/c-qcam.c
index 85cf1778827a..e2cbebab959b 100644
--- a/drivers/media/video/c-qcam.c
+++ b/drivers/media/video/c-qcam.c
@@ -809,8 +809,8 @@ static int init_cqcam(struct parport *port)
809 return -ENODEV; 809 return -ENODEV;
810 } 810 }
811 811
812 printk(KERN_INFO "video%d: Colour QuickCam found on %s\n", 812 printk(KERN_INFO "%s: Colour QuickCam found on %s\n",
813 qcam->vdev.num, qcam->pport->name); 813 video_device_node_name(&qcam->vdev), qcam->pport->name);
814 814
815 qcams[num_cams++] = qcam; 815 qcams[num_cams++] = qcam;
816 816
diff --git a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c
index 2377313c041a..d6f2653afb6c 100644
--- a/drivers/media/video/cpia.c
+++ b/drivers/media/video/cpia.c
@@ -1342,15 +1342,13 @@ out:
1342 1342
1343static void create_proc_cpia_cam(struct cam_data *cam) 1343static void create_proc_cpia_cam(struct cam_data *cam)
1344{ 1344{
1345 char name[5 + 1 + 10 + 1];
1346 struct proc_dir_entry *ent; 1345 struct proc_dir_entry *ent;
1347 1346
1348 if (!cpia_proc_root || !cam) 1347 if (!cpia_proc_root || !cam)
1349 return; 1348 return;
1350 1349
1351 snprintf(name, sizeof(name), "video%d", cam->vdev.num); 1350 ent = create_proc_entry(video_device_node_name(&cam->vdev),
1352 1351 S_IFREG|S_IRUGO|S_IWUSR, cpia_proc_root);
1353 ent = create_proc_entry(name, S_IFREG|S_IRUGO|S_IWUSR, cpia_proc_root);
1354 if (!ent) 1352 if (!ent)
1355 return; 1353 return;
1356 1354
@@ -1368,13 +1366,10 @@ static void create_proc_cpia_cam(struct cam_data *cam)
1368 1366
1369static void destroy_proc_cpia_cam(struct cam_data *cam) 1367static void destroy_proc_cpia_cam(struct cam_data *cam)
1370{ 1368{
1371 char name[5 + 1 + 10 + 1];
1372
1373 if (!cam || !cam->proc_entry) 1369 if (!cam || !cam->proc_entry)
1374 return; 1370 return;
1375 1371
1376 snprintf(name, sizeof(name), "video%d", cam->vdev.num); 1372 remove_proc_entry(video_device_node_name(&cam->vdev), cpia_proc_root);
1377 remove_proc_entry(name, cpia_proc_root);
1378 cam->proc_entry = NULL; 1373 cam->proc_entry = NULL;
1379} 1374}
1380 1375
@@ -3999,7 +3994,7 @@ void cpia_unregister_camera(struct cam_data *cam)
3999 } 3994 }
4000 3995
4001#ifdef CONFIG_PROC_FS 3996#ifdef CONFIG_PROC_FS
4002 DBG("destroying /proc/cpia/video%d\n", cam->vdev.num); 3997 DBG("destroying /proc/cpia/%s\n", video_device_node_name(&cam->vdev));
4003 destroy_proc_cpia_cam(cam); 3998 destroy_proc_cpia_cam(cam);
4004#endif 3999#endif
4005 if (!cam->open_count) { 4000 if (!cam->open_count) {
diff --git a/drivers/media/video/cpia2/cpia2_v4l.c b/drivers/media/video/cpia2/cpia2_v4l.c
index 0b4a8f309cfa..f8952af30a3c 100644
--- a/drivers/media/video/cpia2/cpia2_v4l.c
+++ b/drivers/media/video/cpia2/cpia2_v4l.c
@@ -1967,9 +1967,9 @@ void cpia2_unregister_camera(struct camera_data *cam)
1967 if (!cam->open_count) { 1967 if (!cam->open_count) {
1968 video_unregister_device(cam->vdev); 1968 video_unregister_device(cam->vdev);
1969 } else { 1969 } else {
1970 LOG("/dev/video%d removed while open, " 1970 LOG("%s removed while open, deferring "
1971 "deferring video_unregister_device\n", 1971 "video_unregister_device\n",
1972 cam->vdev->num); 1972 video_device_node_name(cam->vdev));
1973 } 1973 }
1974} 1974}
1975 1975
diff --git a/drivers/media/video/cx18/cx18-streams.c b/drivers/media/video/cx18/cx18-streams.c
index c398651dd74c..987a9308d938 100644
--- a/drivers/media/video/cx18/cx18-streams.c
+++ b/drivers/media/video/cx18/cx18-streams.c
@@ -219,6 +219,7 @@ static int cx18_reg_dev(struct cx18 *cx, int type)
219{ 219{
220 struct cx18_stream *s = &cx->streams[type]; 220 struct cx18_stream *s = &cx->streams[type];
221 int vfl_type = cx18_stream_info[type].vfl_type; 221 int vfl_type = cx18_stream_info[type].vfl_type;
222 const char *name;
222 int num, ret; 223 int num, ret;
223 224
224 /* TODO: Shouldn't this be a VFL_TYPE_TRANSPORT or something? 225 /* TODO: Shouldn't this be a VFL_TYPE_TRANSPORT or something?
@@ -258,31 +259,30 @@ static int cx18_reg_dev(struct cx18 *cx, int type)
258 s->video_dev = NULL; 259 s->video_dev = NULL;
259 return ret; 260 return ret;
260 } 261 }
261 num = s->video_dev->num; 262
263 name = video_device_node_name(s->video_dev);
262 264
263 switch (vfl_type) { 265 switch (vfl_type) {
264 case VFL_TYPE_GRABBER: 266 case VFL_TYPE_GRABBER:
265 CX18_INFO("Registered device video%d for %s " 267 CX18_INFO("Registered device %s for %s (%d x %d.%02d kB)\n",
266 "(%d x %d.%02d kB)\n", 268 name, s->name, cx->stream_buffers[type],
267 num, s->name, cx->stream_buffers[type],
268 cx->stream_buf_size[type] / 1024, 269 cx->stream_buf_size[type] / 1024,
269 (cx->stream_buf_size[type] * 100 / 1024) % 100); 270 (cx->stream_buf_size[type] * 100 / 1024) % 100);
270 break; 271 break;
271 272
272 case VFL_TYPE_RADIO: 273 case VFL_TYPE_RADIO:
273 CX18_INFO("Registered device radio%d for %s\n", 274 CX18_INFO("Registered device %s for %s\n", name, s->name);
274 num, s->name);
275 break; 275 break;
276 276
277 case VFL_TYPE_VBI: 277 case VFL_TYPE_VBI:
278 if (cx->stream_buffers[type]) 278 if (cx->stream_buffers[type])
279 CX18_INFO("Registered device vbi%d for %s " 279 CX18_INFO("Registered device %s for %s "
280 "(%d x %d bytes)\n", 280 "(%d x %d bytes)\n",
281 num, s->name, cx->stream_buffers[type], 281 name, s->name, cx->stream_buffers[type],
282 cx->stream_buf_size[type]); 282 cx->stream_buf_size[type]);
283 else 283 else
284 CX18_INFO("Registered device vbi%d for %s\n", 284 CX18_INFO("Registered device %s for %s\n",
285 num, s->name); 285 name, s->name);
286 break; 286 break;
287 } 287 }
288 288
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c
index 319c459459e0..ff534fe7f4a3 100644
--- a/drivers/media/video/cx231xx/cx231xx-cards.c
+++ b/drivers/media/video/cx231xx/cx231xx-cards.c
@@ -856,8 +856,9 @@ static void cx231xx_usb_disconnect(struct usb_interface *interface)
856 856
857 if (dev->users) { 857 if (dev->users) {
858 cx231xx_warn 858 cx231xx_warn
859 ("device /dev/video%d is open! Deregistration and memory " 859 ("device %s is open! Deregistration and memory "
860 "deallocation are deferred on close.\n", dev->vdev->num); 860 "deallocation are deferred on close.\n",
861 video_device_node_name(dev->vdev));
861 862
862 dev->state |= DEV_MISCONFIGURED; 863 dev->state |= DEV_MISCONFIGURED;
863 cx231xx_uninit_isoc(dev); 864 cx231xx_uninit_isoc(dev);
diff --git a/drivers/media/video/cx231xx/cx231xx-video.c b/drivers/media/video/cx231xx/cx231xx-video.c
index d095aa0d6d19..1c7f84e203e6 100644
--- a/drivers/media/video/cx231xx/cx231xx-video.c
+++ b/drivers/media/video/cx231xx/cx231xx-video.c
@@ -2027,8 +2027,8 @@ void cx231xx_release_analog_resources(struct cx231xx *dev)
2027 dev->radio_dev = NULL; 2027 dev->radio_dev = NULL;
2028 } 2028 }
2029 if (dev->vbi_dev) { 2029 if (dev->vbi_dev) {
2030 cx231xx_info("V4L2 device /dev/vbi%d deregistered\n", 2030 cx231xx_info("V4L2 device %s deregistered\n",
2031 dev->vbi_dev->num); 2031 video_device_node_name(dev->vbi_dev));
2032 if (-1 != dev->vbi_dev->minor) 2032 if (-1 != dev->vbi_dev->minor)
2033 video_unregister_device(dev->vbi_dev); 2033 video_unregister_device(dev->vbi_dev);
2034 else 2034 else
@@ -2036,8 +2036,8 @@ void cx231xx_release_analog_resources(struct cx231xx *dev)
2036 dev->vbi_dev = NULL; 2036 dev->vbi_dev = NULL;
2037 } 2037 }
2038 if (dev->vdev) { 2038 if (dev->vdev) {
2039 cx231xx_info("V4L2 device /dev/video%d deregistered\n", 2039 cx231xx_info("V4L2 device %s deregistered\n",
2040 dev->vdev->num); 2040 video_device_node_name(dev->vdev));
2041 if (-1 != dev->vdev->minor) 2041 if (-1 != dev->vdev->minor)
2042 video_unregister_device(dev->vdev); 2042 video_unregister_device(dev->vdev);
2043 else 2043 else
@@ -2374,8 +2374,8 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
2374 return ret; 2374 return ret;
2375 } 2375 }
2376 2376
2377 cx231xx_info("%s/0: registered device video%d [v4l2]\n", 2377 cx231xx_info("%s/0: registered device %s [v4l2]\n",
2378 dev->name, dev->vdev->num); 2378 dev->name, video_device_node_name(dev->vdev));
2379 2379
2380 /* Initialize VBI template */ 2380 /* Initialize VBI template */
2381 memcpy(&cx231xx_vbi_template, &cx231xx_video_template, 2381 memcpy(&cx231xx_vbi_template, &cx231xx_video_template,
@@ -2393,8 +2393,8 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
2393 return ret; 2393 return ret;
2394 } 2394 }
2395 2395
2396 cx231xx_info("%s/0: registered device vbi%d\n", 2396 cx231xx_info("%s/0: registered device %s\n",
2397 dev->name, dev->vbi_dev->num); 2397 dev->name, video_device_node_name(dev->vbi_dev));
2398 2398
2399 if (cx231xx_boards[dev->model].radio.type == CX231XX_RADIO) { 2399 if (cx231xx_boards[dev->model].radio.type == CX231XX_RADIO) {
2400 dev->radio_dev = cx231xx_vdev_init(dev, &cx231xx_radio_template, 2400 dev->radio_dev = cx231xx_vdev_init(dev, &cx231xx_radio_template,
@@ -2409,12 +2409,13 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
2409 cx231xx_errdev("can't register radio device\n"); 2409 cx231xx_errdev("can't register radio device\n");
2410 return ret; 2410 return ret;
2411 } 2411 }
2412 cx231xx_info("Registered radio device as /dev/radio%d\n", 2412 cx231xx_info("Registered radio device as %s\n",
2413 dev->radio_dev->num); 2413 video_device_node_name(dev->radio_dev));
2414 } 2414 }
2415 2415
2416 cx231xx_info("V4L2 device registered as /dev/video%d and /dev/vbi%d\n", 2416 cx231xx_info("V4L2 device registered as %s and %s\n",
2417 dev->vdev->num, dev->vbi_dev->num); 2417 video_device_node_name(dev->vdev),
2418 video_device_node_name(dev->vbi_dev));
2418 2419
2419 return 0; 2420 return 0;
2420} 2421}
diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c
index 0eed852c61e9..8084e13dd103 100644
--- a/drivers/media/video/cx23885/cx23885-417.c
+++ b/drivers/media/video/cx23885/cx23885-417.c
@@ -1810,8 +1810,8 @@ int cx23885_417_register(struct cx23885_dev *dev)
1810 return err; 1810 return err;
1811 } 1811 }
1812 1812
1813 printk(KERN_INFO "%s: registered device video%d [mpeg]\n", 1813 printk(KERN_INFO "%s: registered device %s [mpeg]\n",
1814 dev->name, dev->v4l_device->num); 1814 dev->name, video_device_node_name(dev->v4l_device));
1815 1815
1816 return 0; 1816 return 0;
1817} 1817}
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c
index 8b372b4f0de2..5570383fa332 100644
--- a/drivers/media/video/cx23885/cx23885-video.c
+++ b/drivers/media/video/cx23885/cx23885-video.c
@@ -1532,8 +1532,8 @@ int cx23885_video_register(struct cx23885_dev *dev)
1532 dev->name); 1532 dev->name);
1533 goto fail_unreg; 1533 goto fail_unreg;
1534 } 1534 }
1535 printk(KERN_INFO "%s/0: registered device video%d [v4l2]\n", 1535 printk(KERN_INFO "%s/0: registered device %s [v4l2]\n",
1536 dev->name, dev->video_dev->num); 1536 dev->name, video_device_node_name(dev->video_dev));
1537 /* initial device configuration */ 1537 /* initial device configuration */
1538 mutex_lock(&dev->lock); 1538 mutex_lock(&dev->lock);
1539 cx23885_set_tvnorm(dev, dev->tvnorm); 1539 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 fbdc1cde56a6..9f02715b4e15 100644
--- a/drivers/media/video/cx88/cx88-blackbird.c
+++ b/drivers/media/video/cx88/cx88-blackbird.c
@@ -1296,8 +1296,8 @@ static int blackbird_register_video(struct cx8802_dev *dev)
1296 dev->core->name); 1296 dev->core->name);
1297 return err; 1297 return err;
1298 } 1298 }
1299 printk(KERN_INFO "%s/2: registered device video%d [mpeg]\n", 1299 printk(KERN_INFO "%s/2: registered device %s [mpeg]\n",
1300 dev->core->name, dev->mpeg_dev->num); 1300 dev->core->name, video_device_node_name(dev->mpeg_dev));
1301 return 0; 1301 return 0;
1302} 1302}
1303 1303
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index d7e8fcee559c..55063a76a43a 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -1916,8 +1916,8 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
1916 core->name); 1916 core->name);
1917 goto fail_unreg; 1917 goto fail_unreg;
1918 } 1918 }
1919 printk(KERN_INFO "%s/0: registered device video%d [v4l2]\n", 1919 printk(KERN_INFO "%s/0: registered device %s [v4l2]\n",
1920 core->name, dev->video_dev->num); 1920 core->name, video_device_node_name(dev->video_dev));
1921 1921
1922 dev->vbi_dev = cx88_vdev_init(core,dev->pci,&cx8800_vbi_template,"vbi"); 1922 dev->vbi_dev = cx88_vdev_init(core,dev->pci,&cx8800_vbi_template,"vbi");
1923 err = video_register_device(dev->vbi_dev,VFL_TYPE_VBI, 1923 err = video_register_device(dev->vbi_dev,VFL_TYPE_VBI,
@@ -1927,8 +1927,8 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
1927 core->name); 1927 core->name);
1928 goto fail_unreg; 1928 goto fail_unreg;
1929 } 1929 }
1930 printk(KERN_INFO "%s/0: registered device vbi%d\n", 1930 printk(KERN_INFO "%s/0: registered device %s\n",
1931 core->name, dev->vbi_dev->num); 1931 core->name, video_device_node_name(dev->vbi_dev));
1932 1932
1933 if (core->board.radio.type == CX88_RADIO) { 1933 if (core->board.radio.type == CX88_RADIO) {
1934 dev->radio_dev = cx88_vdev_init(core,dev->pci, 1934 dev->radio_dev = cx88_vdev_init(core,dev->pci,
@@ -1940,8 +1940,8 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
1940 core->name); 1940 core->name);
1941 goto fail_unreg; 1941 goto fail_unreg;
1942 } 1942 }
1943 printk(KERN_INFO "%s/0: registered device radio%d\n", 1943 printk(KERN_INFO "%s/0: registered device %s\n",
1944 core->name, dev->radio_dev->num); 1944 core->name, video_device_node_name(dev->radio_dev));
1945 } 1945 }
1946 1946
1947 /* everything worked */ 1947 /* everything worked */
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 82da205047be..4ace70946d32 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -2923,9 +2923,9 @@ static void em28xx_usb_disconnect(struct usb_interface *interface)
2923 2923
2924 if (dev->users) { 2924 if (dev->users) {
2925 em28xx_warn 2925 em28xx_warn
2926 ("device /dev/video%d is open! Deregistration and memory " 2926 ("device %s is open! Deregistration and memory "
2927 "deallocation are deferred on close.\n", 2927 "deallocation are deferred on close.\n",
2928 dev->vdev->num); 2928 video_device_node_name(dev->vdev));
2929 2929
2930 dev->state |= DEV_MISCONFIGURED; 2930 dev->state |= DEV_MISCONFIGURED;
2931 em28xx_uninit_isoc(dev); 2931 em28xx_uninit_isoc(dev);
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 7ad65370f274..5cc4fff04cdb 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -2167,8 +2167,8 @@ void em28xx_release_analog_resources(struct em28xx *dev)
2167 dev->radio_dev = NULL; 2167 dev->radio_dev = NULL;
2168 } 2168 }
2169 if (dev->vbi_dev) { 2169 if (dev->vbi_dev) {
2170 em28xx_info("V4L2 device /dev/vbi%d deregistered\n", 2170 em28xx_info("V4L2 device %s deregistered\n",
2171 dev->vbi_dev->num); 2171 video_device_node_name(dev->vbi_dev));
2172 if (-1 != dev->vbi_dev->minor) 2172 if (-1 != dev->vbi_dev->minor)
2173 video_unregister_device(dev->vbi_dev); 2173 video_unregister_device(dev->vbi_dev);
2174 else 2174 else
@@ -2176,8 +2176,8 @@ void em28xx_release_analog_resources(struct em28xx *dev)
2176 dev->vbi_dev = NULL; 2176 dev->vbi_dev = NULL;
2177 } 2177 }
2178 if (dev->vdev) { 2178 if (dev->vdev) {
2179 em28xx_info("V4L2 device /dev/video%d deregistered\n", 2179 em28xx_info("V4L2 device %s deregistered\n",
2180 dev->vdev->num); 2180 video_device_node_name(dev->vdev));
2181 if (-1 != dev->vdev->minor) 2181 if (-1 != dev->vdev->minor)
2182 video_unregister_device(dev->vdev); 2182 video_unregister_device(dev->vdev);
2183 else 2183 else
@@ -2540,16 +2540,16 @@ int em28xx_register_analog_devices(struct em28xx *dev)
2540 em28xx_errdev("can't register radio device\n"); 2540 em28xx_errdev("can't register radio device\n");
2541 return ret; 2541 return ret;
2542 } 2542 }
2543 em28xx_info("Registered radio device as /dev/radio%d\n", 2543 em28xx_info("Registered radio device as %s\n",
2544 dev->radio_dev->num); 2544 video_device_node_name(dev->radio_dev));
2545 } 2545 }
2546 2546
2547 em28xx_info("V4L2 video device registered as /dev/video%d\n", 2547 em28xx_info("V4L2 video device registered as %s\n",
2548 dev->vdev->num); 2548 video_device_node_name(dev->vdev));
2549 2549
2550 if (dev->vbi_dev) 2550 if (dev->vbi_dev)
2551 em28xx_info("V4L2 VBI device registered as /dev/vbi%d\n", 2551 em28xx_info("V4L2 VBI device registered as %s\n",
2552 dev->vbi_dev->num); 2552 video_device_node_name(dev->vbi_dev));
2553 2553
2554 return 0; 2554 return 0;
2555} 2555}
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;
diff --git a/drivers/media/video/gspca/gl860/gl860.c b/drivers/media/video/gspca/gl860/gl860.c
index a695e0ae13c2..bd3c21a37be6 100644
--- a/drivers/media/video/gspca/gl860/gl860.c
+++ b/drivers/media/video/gspca/gl860/gl860.c
@@ -534,8 +534,8 @@ static int sd_probe(struct usb_interface *intf,
534 gspca_dev = usb_get_intfdata(intf); 534 gspca_dev = usb_get_intfdata(intf);
535 535
536 PDEBUG(D_PROBE, 536 PDEBUG(D_PROBE,
537 "Camera is now controlling video device /dev/video%d", 537 "Camera is now controlling video device %s",
538 gspca_dev->vdev.minor); 538 video_device_node_name(&gspca_dev->vdev));
539 } 539 }
540 540
541 return ret; 541 return ret;
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 4076f8e5a6fc..6af4f233bf52 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -987,7 +987,8 @@ static void gspca_release(struct video_device *vfd)
987{ 987{
988 struct gspca_dev *gspca_dev = container_of(vfd, struct gspca_dev, vdev); 988 struct gspca_dev *gspca_dev = container_of(vfd, struct gspca_dev, vdev);
989 989
990 PDEBUG(D_PROBE, "/dev/video%d released", gspca_dev->vdev.num); 990 PDEBUG(D_PROBE, "%s released",
991 video_device_node_name(&gspca_dev->vdev));
991 992
992 kfree(gspca_dev->usb_buf); 993 kfree(gspca_dev->usb_buf);
993 kfree(gspca_dev); 994 kfree(gspca_dev);
@@ -2073,7 +2074,7 @@ int gspca_dev_probe(struct usb_interface *intf,
2073 } 2074 }
2074 2075
2075 usb_set_intfdata(intf, gspca_dev); 2076 usb_set_intfdata(intf, gspca_dev);
2076 PDEBUG(D_PROBE, "/dev/video%d created", gspca_dev->vdev.num); 2077 PDEBUG(D_PROBE, "%s created", video_device_node_name(&gspca_dev->vdev));
2077 return 0; 2078 return 0;
2078out: 2079out:
2079 kfree(gspca_dev->usb_buf); 2080 kfree(gspca_dev->usb_buf);
@@ -2092,7 +2093,8 @@ void gspca_disconnect(struct usb_interface *intf)
2092{ 2093{
2093 struct gspca_dev *gspca_dev = usb_get_intfdata(intf); 2094 struct gspca_dev *gspca_dev = usb_get_intfdata(intf);
2094 2095
2095 PDEBUG(D_PROBE, "/dev/video%d disconnect", gspca_dev->vdev.num); 2096 PDEBUG(D_PROBE, "%s disconnect",
2097 video_device_node_name(&gspca_dev->vdev));
2096 mutex_lock(&gspca_dev->usb_lock); 2098 mutex_lock(&gspca_dev->usb_lock);
2097 gspca_dev->present = 0; 2099 gspca_dev->present = 0;
2098 2100
diff --git a/drivers/media/video/hdpvr/hdpvr-core.c b/drivers/media/video/hdpvr/hdpvr-core.c
index 1c9bc94c905c..e280eb178fe9 100644
--- a/drivers/media/video/hdpvr/hdpvr-core.c
+++ b/drivers/media/video/hdpvr/hdpvr-core.c
@@ -376,8 +376,8 @@ static int hdpvr_probe(struct usb_interface *interface,
376 usb_set_intfdata(interface, dev); 376 usb_set_intfdata(interface, dev);
377 377
378 /* let the user know what node this device is now attached to */ 378 /* let the user know what node this device is now attached to */
379 v4l2_info(&dev->v4l2_dev, "device now attached to /dev/video%d\n", 379 v4l2_info(&dev->v4l2_dev, "device now attached to %s\n",
380 dev->video_dev->minor); 380 video_device_node_name(dev->video_dev));
381 return 0; 381 return 0;
382 382
383error: 383error:
@@ -391,13 +391,10 @@ error:
391static void hdpvr_disconnect(struct usb_interface *interface) 391static void hdpvr_disconnect(struct usb_interface *interface)
392{ 392{
393 struct hdpvr_device *dev; 393 struct hdpvr_device *dev;
394 int minor;
395 394
396 dev = usb_get_intfdata(interface); 395 dev = usb_get_intfdata(interface);
397 usb_set_intfdata(interface, NULL); 396 usb_set_intfdata(interface, NULL);
398 397
399 minor = dev->video_dev->minor;
400
401 /* prevent more I/O from starting and stop any ongoing */ 398 /* prevent more I/O from starting and stop any ongoing */
402 mutex_lock(&dev->io_mutex); 399 mutex_lock(&dev->io_mutex);
403 dev->status = STATUS_DISCONNECTED; 400 dev->status = STATUS_DISCONNECTED;
@@ -425,7 +422,8 @@ static void hdpvr_disconnect(struct usb_interface *interface)
425 422
426 atomic_dec(&dev_nr); 423 atomic_dec(&dev_nr);
427 424
428 v4l2_info(&dev->v4l2_dev, "device /dev/video%d disconnected\n", minor); 425 v4l2_info(&dev->v4l2_dev, "device %s disconnected\n",
426 video_device_node_name(dev->video_dev));
429 427
430 v4l2_device_unregister(&dev->v4l2_dev); 428 v4l2_device_unregister(&dev->v4l2_dev);
431 kfree(dev->usbc_buf); 429 kfree(dev->usbc_buf);
diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/video/ivtv/ivtv-streams.c
index 67699e3f2aaa..e12c6022373e 100644
--- a/drivers/media/video/ivtv/ivtv-streams.c
+++ b/drivers/media/video/ivtv/ivtv-streams.c
@@ -245,6 +245,7 @@ static int ivtv_reg_dev(struct ivtv *itv, int type)
245{ 245{
246 struct ivtv_stream *s = &itv->streams[type]; 246 struct ivtv_stream *s = &itv->streams[type];
247 int vfl_type = ivtv_stream_info[type].vfl_type; 247 int vfl_type = ivtv_stream_info[type].vfl_type;
248 const char *name;
248 int num; 249 int num;
249 250
250 if (s->vdev == NULL) 251 if (s->vdev == NULL)
@@ -268,24 +269,24 @@ static int ivtv_reg_dev(struct ivtv *itv, int type)
268 s->vdev = NULL; 269 s->vdev = NULL;
269 return -ENOMEM; 270 return -ENOMEM;
270 } 271 }
271 num = s->vdev->num; 272 name = video_device_node_name(s->vdev);
272 273
273 switch (vfl_type) { 274 switch (vfl_type) {
274 case VFL_TYPE_GRABBER: 275 case VFL_TYPE_GRABBER:
275 IVTV_INFO("Registered device video%d for %s (%d kB)\n", 276 IVTV_INFO("Registered device %s for %s (%d kB)\n",
276 num, s->name, itv->options.kilobytes[type]); 277 name, s->name, itv->options.kilobytes[type]);
277 break; 278 break;
278 case VFL_TYPE_RADIO: 279 case VFL_TYPE_RADIO:
279 IVTV_INFO("Registered device radio%d for %s\n", 280 IVTV_INFO("Registered device %s for %s\n",
280 num, s->name); 281 name, s->name);
281 break; 282 break;
282 case VFL_TYPE_VBI: 283 case VFL_TYPE_VBI:
283 if (itv->options.kilobytes[type]) 284 if (itv->options.kilobytes[type])
284 IVTV_INFO("Registered device vbi%d for %s (%d kB)\n", 285 IVTV_INFO("Registered device %s for %s (%d kB)\n",
285 num, s->name, itv->options.kilobytes[type]); 286 name, s->name, itv->options.kilobytes[type]);
286 else 287 else
287 IVTV_INFO("Registered device vbi%d for %s\n", 288 IVTV_INFO("Registered device %s for %s\n",
288 num, s->name); 289 name, s->name);
289 break; 290 break;
290 } 291 }
291 return 0; 292 return 0;
diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c
index 5fc4ac0d88f0..e2f137b0daeb 100644
--- a/drivers/media/video/omap24xxcam.c
+++ b/drivers/media/video/omap24xxcam.c
@@ -1678,7 +1678,8 @@ static int omap24xxcam_device_register(struct v4l2_int_device *s)
1678 1678
1679 omap24xxcam_poweron_reset(cam); 1679 omap24xxcam_poweron_reset(cam);
1680 1680
1681 dev_info(cam->dev, "registered device video%d\n", vfd->minor); 1681 dev_info(cam->dev, "registered device %s\n",
1682 video_device_node_name(vfd));
1682 1683
1683 return 0; 1684 return 0;
1684 1685
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
index 6aa48e0ae731..cc8ddb2d2382 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -151,17 +151,6 @@ static struct v4l2_format pvr_format [] = {
151}; 151};
152 152
153 153
154static const char *get_v4l_name(int v4l_type)
155{
156 switch (v4l_type) {
157 case VFL_TYPE_GRABBER: return "video";
158 case VFL_TYPE_RADIO: return "radio";
159 case VFL_TYPE_VBI: return "vbi";
160 default: return "?";
161 }
162}
163
164
165/* 154/*
166 * pvr_ioctl() 155 * pvr_ioctl()
167 * 156 *
@@ -891,10 +880,8 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
891 880
892static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip) 881static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip)
893{ 882{
894 int num = dip->devbase.num;
895 struct pvr2_hdw *hdw = dip->v4lp->channel.mc_head->hdw; 883 struct pvr2_hdw *hdw = dip->v4lp->channel.mc_head->hdw;
896 enum pvr2_config cfg = dip->config; 884 enum pvr2_config cfg = dip->config;
897 int v4l_type = dip->v4l_type;
898 885
899 pvr2_hdw_v4l_store_minor_number(hdw,dip->minor_type,-1); 886 pvr2_hdw_v4l_store_minor_number(hdw,dip->minor_type,-1);
900 887
@@ -906,8 +893,8 @@ static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip)
906 are gone. */ 893 are gone. */
907 video_unregister_device(&dip->devbase); 894 video_unregister_device(&dip->devbase);
908 895
909 printk(KERN_INFO "pvrusb2: unregistered device %s%u [%s]\n", 896 printk(KERN_INFO "pvrusb2: unregistered device %s [%s]\n",
910 get_v4l_name(v4l_type), num, 897 video_device_node_name(&dip->devbase),
911 pvr2_config_get_name(cfg)); 898 pvr2_config_get_name(cfg));
912 899
913} 900}
@@ -1317,8 +1304,8 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,
1317 ": Failed to register pvrusb2 v4l device\n"); 1304 ": Failed to register pvrusb2 v4l device\n");
1318 } 1305 }
1319 1306
1320 printk(KERN_INFO "pvrusb2: registered device %s%u [%s]\n", 1307 printk(KERN_INFO "pvrusb2: registered device %s [%s]\n",
1321 get_v4l_name(dip->v4l_type), dip->devbase.num, 1308 video_device_node_name(&dip->devbase),
1322 pvr2_config_get_name(dip->config)); 1309 pvr2_config_get_name(dip->config));
1323 1310
1324 pvr2_hdw_v4l_store_minor_number(vp->channel.mc_head->hdw, 1311 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 89b620f6db7b..819cf4e7c581 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -1807,7 +1807,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
1807 goto err_video_release; 1807 goto err_video_release;
1808 } 1808 }
1809 1809
1810 PWC_INFO("Registered as /dev/video%d.\n", pdev->vdev->num); 1810 PWC_INFO("Registered as %s.\n", video_device_node_name(pdev->vdev));
1811 1811
1812 /* occupy slot */ 1812 /* occupy slot */
1813 if (hint < MAX_DEV_HINTS) 1813 if (hint < MAX_DEV_HINTS)
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c
index 0ba7f5af0fc3..c07f07277810 100644
--- a/drivers/media/video/saa7134/saa7134-core.c
+++ b/drivers/media/video/saa7134/saa7134-core.c
@@ -1046,8 +1046,8 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
1046 dev->name); 1046 dev->name);
1047 goto fail4; 1047 goto fail4;
1048 } 1048 }
1049 printk(KERN_INFO "%s: registered device video%d [v4l2]\n", 1049 printk(KERN_INFO "%s: registered device %s [v4l2]\n",
1050 dev->name, dev->video_dev->num); 1050 dev->name, video_device_node_name(dev->video_dev));
1051 1051
1052 dev->vbi_dev = vdev_init(dev, &saa7134_video_template, "vbi"); 1052 dev->vbi_dev = vdev_init(dev, &saa7134_video_template, "vbi");
1053 1053
@@ -1055,8 +1055,8 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
1055 vbi_nr[dev->nr]); 1055 vbi_nr[dev->nr]);
1056 if (err < 0) 1056 if (err < 0)
1057 goto fail4; 1057 goto fail4;
1058 printk(KERN_INFO "%s: registered device vbi%d\n", 1058 printk(KERN_INFO "%s: registered device %s\n",
1059 dev->name, dev->vbi_dev->num); 1059 dev->name, video_device_node_name(dev->vbi_dev));
1060 1060
1061 if (card_has_radio(dev)) { 1061 if (card_has_radio(dev)) {
1062 dev->radio_dev = vdev_init(dev,&saa7134_radio_template,"radio"); 1062 dev->radio_dev = vdev_init(dev,&saa7134_radio_template,"radio");
@@ -1064,8 +1064,8 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
1064 radio_nr[dev->nr]); 1064 radio_nr[dev->nr]);
1065 if (err < 0) 1065 if (err < 0)
1066 goto fail4; 1066 goto fail4;
1067 printk(KERN_INFO "%s: registered device radio%d\n", 1067 printk(KERN_INFO "%s: registered device %s\n",
1068 dev->name, dev->radio_dev->num); 1068 dev->name, video_device_node_name(dev->radio_dev));
1069 } 1069 }
1070 1070
1071 /* everything worked */ 1071 /* everything worked */
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c
index 296788c3bf0e..abc1d0bf5837 100644
--- a/drivers/media/video/saa7134/saa7134-empress.c
+++ b/drivers/media/video/saa7134/saa7134-empress.c
@@ -540,8 +540,8 @@ static int empress_init(struct saa7134_dev *dev)
540 dev->empress_dev = NULL; 540 dev->empress_dev = NULL;
541 return err; 541 return err;
542 } 542 }
543 printk(KERN_INFO "%s: registered device video%d [mpeg]\n", 543 printk(KERN_INFO "%s: registered device %s [mpeg]\n",
544 dev->name, dev->empress_dev->num); 544 dev->name, video_device_node_name(dev->empress_dev));
545 545
546 videobuf_queue_sg_init(&dev->empress_tsq, &saa7134_ts_qops, 546 videobuf_queue_sg_init(&dev->empress_tsq, &saa7134_ts_qops,
547 &dev->pci->dev, &dev->slock, 547 &dev->pci->dev, &dev->slock,
diff --git a/drivers/media/video/se401.c b/drivers/media/video/se401.c
index 85ffc2cba039..41d0166c0f95 100644
--- a/drivers/media/video/se401.c
+++ b/drivers/media/video/se401.c
@@ -1428,8 +1428,8 @@ static int se401_probe(struct usb_interface *intf,
1428 err("video_register_device failed"); 1428 err("video_register_device failed");
1429 return -EIO; 1429 return -EIO;
1430 } 1430 }
1431 dev_info(&intf->dev, "registered new video device: video%d\n", 1431 dev_info(&intf->dev, "registered new video device: %s\n",
1432 se401->vdev.num); 1432 video_device_node_name(&se401->vdev));
1433 1433
1434 usb_set_intfdata(intf, se401); 1434 usb_set_intfdata(intf, se401);
1435 return 0; 1435 return 0;
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c
index 4a7711c3e745..4cf41a8d44ed 100644
--- a/drivers/media/video/sn9c102/sn9c102_core.c
+++ b/drivers/media/video/sn9c102/sn9c102_core.c
@@ -1007,8 +1007,8 @@ static int sn9c102_stream_interrupt(struct sn9c102_device* cam)
1007 else if (cam->stream != STREAM_OFF) { 1007 else if (cam->stream != STREAM_OFF) {
1008 cam->state |= DEV_MISCONFIGURED; 1008 cam->state |= DEV_MISCONFIGURED;
1009 DBG(1, "URB timeout reached. The camera is misconfigured. " 1009 DBG(1, "URB timeout reached. The camera is misconfigured. "
1010 "To use it, close and open /dev/video%d again.", 1010 "To use it, close and open %s again.",
1011 cam->v4ldev->num); 1011 video_device_node_name(cam->v4ldev));
1012 return -EIO; 1012 return -EIO;
1013 } 1013 }
1014 1014
@@ -1734,7 +1734,8 @@ static void sn9c102_release_resources(struct kref *kref)
1734 1734
1735 cam = container_of(kref, struct sn9c102_device, kref); 1735 cam = container_of(kref, struct sn9c102_device, kref);
1736 1736
1737 DBG(2, "V4L2 device /dev/video%d deregistered", cam->v4ldev->num); 1737 DBG(2, "V4L2 device %s deregistered",
1738 video_device_node_name(cam->v4ldev));
1738 video_set_drvdata(cam->v4ldev, NULL); 1739 video_set_drvdata(cam->v4ldev, NULL);
1739 video_unregister_device(cam->v4ldev); 1740 video_unregister_device(cam->v4ldev);
1740 usb_put_dev(cam->usbdev); 1741 usb_put_dev(cam->usbdev);
@@ -1791,8 +1792,8 @@ static int sn9c102_open(struct file *filp)
1791 } 1792 }
1792 1793
1793 if (cam->users) { 1794 if (cam->users) {
1794 DBG(2, "Device /dev/video%d is already in use", 1795 DBG(2, "Device %s is already in use",
1795 cam->v4ldev->num); 1796 video_device_node_name(cam->v4ldev));
1796 DBG(3, "Simultaneous opens are not supported"); 1797 DBG(3, "Simultaneous opens are not supported");
1797 /* 1798 /*
1798 open() must follow the open flags and should block 1799 open() must follow the open flags and should block
@@ -1845,7 +1846,7 @@ static int sn9c102_open(struct file *filp)
1845 cam->frame_count = 0; 1846 cam->frame_count = 0;
1846 sn9c102_empty_framequeues(cam); 1847 sn9c102_empty_framequeues(cam);
1847 1848
1848 DBG(3, "Video device /dev/video%d is open", cam->v4ldev->num); 1849 DBG(3, "Video device %s is open", video_device_node_name(cam->v4ldev));
1849 1850
1850out: 1851out:
1851 mutex_unlock(&cam->open_mutex); 1852 mutex_unlock(&cam->open_mutex);
@@ -1870,7 +1871,7 @@ static int sn9c102_release(struct file *filp)
1870 cam->users--; 1871 cam->users--;
1871 wake_up_interruptible_nr(&cam->wait_open, 1); 1872 wake_up_interruptible_nr(&cam->wait_open, 1);
1872 1873
1873 DBG(3, "Video device /dev/video%d closed", cam->v4ldev->num); 1874 DBG(3, "Video device %s closed", video_device_node_name(cam->v4ldev));
1874 1875
1875 kref_put(&cam->kref, sn9c102_release_resources); 1876 kref_put(&cam->kref, sn9c102_release_resources);
1876 1877
@@ -2433,8 +2434,8 @@ sn9c102_vidioc_s_crop(struct sn9c102_device* cam, void __user * arg)
2433 if (err) { /* atomic, no rollback in ioctl() */ 2434 if (err) { /* atomic, no rollback in ioctl() */
2434 cam->state |= DEV_MISCONFIGURED; 2435 cam->state |= DEV_MISCONFIGURED;
2435 DBG(1, "VIDIOC_S_CROP failed because of hardware problems. To " 2436 DBG(1, "VIDIOC_S_CROP failed because of hardware problems. To "
2436 "use the camera, close and open /dev/video%d again.", 2437 "use the camera, close and open %s again.",
2437 cam->v4ldev->num); 2438 video_device_node_name(cam->v4ldev));
2438 return -EIO; 2439 return -EIO;
2439 } 2440 }
2440 2441
@@ -2446,8 +2447,8 @@ sn9c102_vidioc_s_crop(struct sn9c102_device* cam, void __user * arg)
2446 nbuffers != sn9c102_request_buffers(cam, nbuffers, cam->io)) { 2447 nbuffers != sn9c102_request_buffers(cam, nbuffers, cam->io)) {
2447 cam->state |= DEV_MISCONFIGURED; 2448 cam->state |= DEV_MISCONFIGURED;
2448 DBG(1, "VIDIOC_S_CROP failed because of not enough memory. To " 2449 DBG(1, "VIDIOC_S_CROP failed because of not enough memory. To "
2449 "use the camera, close and open /dev/video%d again.", 2450 "use the camera, close and open %s again.",
2450 cam->v4ldev->num); 2451 video_device_node_name(cam->v4ldev));
2451 return -ENOMEM; 2452 return -ENOMEM;
2452 } 2453 }
2453 2454
@@ -2690,8 +2691,8 @@ sn9c102_vidioc_try_s_fmt(struct sn9c102_device* cam, unsigned int cmd,
2690 if (err) { /* atomic, no rollback in ioctl() */ 2691 if (err) { /* atomic, no rollback in ioctl() */
2691 cam->state |= DEV_MISCONFIGURED; 2692 cam->state |= DEV_MISCONFIGURED;
2692 DBG(1, "VIDIOC_S_FMT failed because of hardware problems. To " 2693 DBG(1, "VIDIOC_S_FMT failed because of hardware problems. To "
2693 "use the camera, close and open /dev/video%d again.", 2694 "use the camera, close and open %s again.",
2694 cam->v4ldev->num); 2695 video_device_node_name(cam->v4ldev));
2695 return -EIO; 2696 return -EIO;
2696 } 2697 }
2697 2698
@@ -2702,8 +2703,8 @@ sn9c102_vidioc_try_s_fmt(struct sn9c102_device* cam, unsigned int cmd,
2702 nbuffers != sn9c102_request_buffers(cam, nbuffers, cam->io)) { 2703 nbuffers != sn9c102_request_buffers(cam, nbuffers, cam->io)) {
2703 cam->state |= DEV_MISCONFIGURED; 2704 cam->state |= DEV_MISCONFIGURED;
2704 DBG(1, "VIDIOC_S_FMT failed because of not enough memory. To " 2705 DBG(1, "VIDIOC_S_FMT failed because of not enough memory. To "
2705 "use the camera, close and open /dev/video%d again.", 2706 "use the camera, close and open %s again.",
2706 cam->v4ldev->num); 2707 video_device_node_name(cam->v4ldev));
2707 return -ENOMEM; 2708 return -ENOMEM;
2708 } 2709 }
2709 2710
@@ -2748,9 +2749,9 @@ sn9c102_vidioc_s_jpegcomp(struct sn9c102_device* cam, void __user * arg)
2748 err += sn9c102_set_compression(cam, &jc); 2749 err += sn9c102_set_compression(cam, &jc);
2749 if (err) { /* atomic, no rollback in ioctl() */ 2750 if (err) { /* atomic, no rollback in ioctl() */
2750 cam->state |= DEV_MISCONFIGURED; 2751 cam->state |= DEV_MISCONFIGURED;
2751 DBG(1, "VIDIOC_S_JPEGCOMP failed because of hardware " 2752 DBG(1, "VIDIOC_S_JPEGCOMP failed because of hardware problems. "
2752 "problems. To use the camera, close and open " 2753 "To use the camera, close and open %s again.",
2753 "/dev/video%d again.", cam->v4ldev->num); 2754 video_device_node_name(cam->v4ldev));
2754 return -EIO; 2755 return -EIO;
2755 } 2756 }
2756 2757
@@ -3346,7 +3347,8 @@ sn9c102_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
3346 goto fail; 3347 goto fail;
3347 } 3348 }
3348 3349
3349 DBG(2, "V4L2 device registered as /dev/video%d", cam->v4ldev->num); 3350 DBG(2, "V4L2 device registered as %s",
3351 video_device_node_name(cam->v4ldev));
3350 3352
3351 video_set_drvdata(cam->v4ldev, cam); 3353 video_set_drvdata(cam->v4ldev, cam);
3352 cam->module_param.force_munmap = force_munmap[dev_nr]; 3354 cam->module_param.force_munmap = force_munmap[dev_nr];
@@ -3398,9 +3400,9 @@ static void sn9c102_usb_disconnect(struct usb_interface* intf)
3398 DBG(2, "Disconnecting %s...", cam->v4ldev->name); 3400 DBG(2, "Disconnecting %s...", cam->v4ldev->name);
3399 3401
3400 if (cam->users) { 3402 if (cam->users) {
3401 DBG(2, "Device /dev/video%d is open! Deregistration and " 3403 DBG(2, "Device %s is open! Deregistration and memory "
3402 "memory deallocation are deferred.", 3404 "deallocation are deferred.",
3403 cam->v4ldev->num); 3405 video_device_node_name(cam->v4ldev));
3404 cam->state |= DEV_MISCONFIGURED; 3406 cam->state |= DEV_MISCONFIGURED;
3405 sn9c102_stop_transfer(cam); 3407 sn9c102_stop_transfer(cam);
3406 cam->state |= DEV_DISCONNECTED; 3408 cam->state |= DEV_DISCONNECTED;
diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c
index 6b41865f42bd..6590b9299315 100644
--- a/drivers/media/video/stk-webcam.c
+++ b/drivers/media/video/stk-webcam.c
@@ -1327,8 +1327,8 @@ static int stk_register_video_device(struct stk_camera *dev)
1327 if (err) 1327 if (err)
1328 STK_ERROR("v4l registration failed\n"); 1328 STK_ERROR("v4l registration failed\n");
1329 else 1329 else
1330 STK_INFO("Syntek USB2.0 Camera is now controlling video device" 1330 STK_INFO("Syntek USB2.0 Camera is now controlling device %s\n",
1331 " /dev/video%d\n", dev->vdev.num); 1331 video_device_node_name(&dev->vdev));
1332 return err; 1332 return err;
1333} 1333}
1334 1334
@@ -1418,8 +1418,8 @@ static void stk_camera_disconnect(struct usb_interface *interface)
1418 wake_up_interruptible(&dev->wait_frame); 1418 wake_up_interruptible(&dev->wait_frame);
1419 stk_remove_sysfs_files(&dev->vdev); 1419 stk_remove_sysfs_files(&dev->vdev);
1420 1420
1421 STK_INFO("Syntek USB2.0 Camera release resources " 1421 STK_INFO("Syntek USB2.0 Camera release resources device %s\n",
1422 "video device /dev/video%d\n", dev->vdev.num); 1422 video_device_node_name(&dev->vdev));
1423 1423
1424 video_unregister_device(&dev->vdev); 1424 video_unregister_device(&dev->vdev);
1425} 1425}
diff --git a/drivers/media/video/stv680.c b/drivers/media/video/stv680.c
index 6a91714125d2..b54222232cd3 100644
--- a/drivers/media/video/stv680.c
+++ b/drivers/media/video/stv680.c
@@ -1467,8 +1467,8 @@ static int stv680_probe (struct usb_interface *intf, const struct usb_device_id
1467 retval = -EIO; 1467 retval = -EIO;
1468 goto error_vdev; 1468 goto error_vdev;
1469 } 1469 }
1470 PDEBUG(0, "STV(i): registered new video device: video%d", 1470 PDEBUG(0, "STV(i): registered new video device: %s",
1471 stv680->vdev->num); 1471 video_device_node_name(stv680->vdev));
1472 1472
1473 usb_set_intfdata (intf, stv680); 1473 usb_set_intfdata (intf, stv680);
1474 retval = stv680_create_sysfs_files(stv680->vdev); 1474 retval = stv680_create_sysfs_files(stv680->vdev);
diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c
index dea8b321fb4a..5ac37c6c4313 100644
--- a/drivers/media/video/usbvideo/usbvideo.c
+++ b/drivers/media/video/usbvideo/usbvideo.c
@@ -1053,9 +1053,9 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd)
1053 "%s: video_register_device() successful\n", __func__); 1053 "%s: video_register_device() successful\n", __func__);
1054 } 1054 }
1055 1055
1056 dev_info(&uvd->dev->dev, "%s on /dev/video%d: canvas=%s videosize=%s\n", 1056 dev_info(&uvd->dev->dev, "%s on %s: canvas=%s videosize=%s\n",
1057 (uvd->handle != NULL) ? uvd->handle->drvName : "???", 1057 (uvd->handle != NULL) ? uvd->handle->drvName : "???",
1058 uvd->vdev.num, tmp2, tmp1); 1058 video_device_node_name(&uvd->vdev), tmp2, tmp1);
1059 1059
1060 usb_get_dev(uvd->dev); 1060 usb_get_dev(uvd->dev);
1061 return 0; 1061 return 0;
diff --git a/drivers/media/video/usbvideo/vicam.c b/drivers/media/video/usbvideo/vicam.c
index 45fce39ec9ad..b75143ee5dd8 100644
--- a/drivers/media/video/usbvideo/vicam.c
+++ b/drivers/media/video/usbvideo/vicam.c
@@ -873,8 +873,8 @@ vicam_probe( struct usb_interface *intf, const struct usb_device_id *id)
873 return -EIO; 873 return -EIO;
874 } 874 }
875 875
876 printk(KERN_INFO "ViCam webcam driver now controlling video device %d\n", 876 printk(KERN_INFO "ViCam webcam driver now controlling device %s\n",
877 cam->vdev.num); 877 video_device_node_name(&cam->vdev));
878 878
879 usb_set_intfdata (intf, cam); 879 usb_set_intfdata (intf, cam);
880 880
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c
index c07b0ac452ab..639c3396ae77 100644
--- a/drivers/media/video/usbvision/usbvision-video.c
+++ b/drivers/media/video/usbvision/usbvision-video.c
@@ -1416,8 +1416,8 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision)
1416{ 1416{
1417 // vbi Device: 1417 // vbi Device:
1418 if (usbvision->vbi) { 1418 if (usbvision->vbi) {
1419 PDEBUG(DBG_PROBE, "unregister /dev/vbi%d [v4l2]", 1419 PDEBUG(DBG_PROBE, "unregister %s [v4l2]",
1420 usbvision->vbi->num); 1420 video_device_node_name(usbvision->vbi));
1421 if (usbvision->vbi->minor != -1) { 1421 if (usbvision->vbi->minor != -1) {
1422 video_unregister_device(usbvision->vbi); 1422 video_unregister_device(usbvision->vbi);
1423 } else { 1423 } else {
@@ -1428,8 +1428,8 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision)
1428 1428
1429 // Radio Device: 1429 // Radio Device:
1430 if (usbvision->rdev) { 1430 if (usbvision->rdev) {
1431 PDEBUG(DBG_PROBE, "unregister /dev/radio%d [v4l2]", 1431 PDEBUG(DBG_PROBE, "unregister %s [v4l2]",
1432 usbvision->rdev->num); 1432 video_device_node_name(usbvision->rdev));
1433 if (usbvision->rdev->minor != -1) { 1433 if (usbvision->rdev->minor != -1) {
1434 video_unregister_device(usbvision->rdev); 1434 video_unregister_device(usbvision->rdev);
1435 } else { 1435 } else {
@@ -1440,8 +1440,8 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision)
1440 1440
1441 // Video Device: 1441 // Video Device:
1442 if (usbvision->vdev) { 1442 if (usbvision->vdev) {
1443 PDEBUG(DBG_PROBE, "unregister /dev/video%d [v4l2]", 1443 PDEBUG(DBG_PROBE, "unregister %s [v4l2]",
1444 usbvision->vdev->num); 1444 video_device_node_name(usbvision->vdev));
1445 if (usbvision->vdev->minor != -1) { 1445 if (usbvision->vdev->minor != -1) {
1446 video_unregister_device(usbvision->vdev); 1446 video_unregister_device(usbvision->vdev);
1447 } else { 1447 } else {
@@ -1466,8 +1466,8 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision)
1466 video_nr)<0) { 1466 video_nr)<0) {
1467 goto err_exit; 1467 goto err_exit;
1468 } 1468 }
1469 printk(KERN_INFO "USBVision[%d]: registered USBVision Video device /dev/video%d [v4l2]\n", 1469 printk(KERN_INFO "USBVision[%d]: registered USBVision Video device %s [v4l2]\n",
1470 usbvision->nr, usbvision->vdev->num); 1470 usbvision->nr, video_device_node_name(usbvision->vdev));
1471 1471
1472 // Radio Device: 1472 // Radio Device:
1473 if (usbvision_device_data[usbvision->DevModel].Radio) { 1473 if (usbvision_device_data[usbvision->DevModel].Radio) {
@@ -1483,8 +1483,8 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision)
1483 radio_nr)<0) { 1483 radio_nr)<0) {
1484 goto err_exit; 1484 goto err_exit;
1485 } 1485 }
1486 printk(KERN_INFO "USBVision[%d]: registered USBVision Radio device /dev/radio%d [v4l2]\n", 1486 printk(KERN_INFO "USBVision[%d]: registered USBVision Radio device %s [v4l2]\n",
1487 usbvision->nr, usbvision->rdev->num); 1487 usbvision->nr, video_device_node_name(usbvision->rdev));
1488 } 1488 }
1489 // vbi Device: 1489 // vbi Device:
1490 if (usbvision_device_data[usbvision->DevModel].vbi) { 1490 if (usbvision_device_data[usbvision->DevModel].vbi) {
@@ -1499,8 +1499,8 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision)
1499 vbi_nr)<0) { 1499 vbi_nr)<0) {
1500 goto err_exit; 1500 goto err_exit;
1501 } 1501 }
1502 printk(KERN_INFO "USBVision[%d]: registered USBVision VBI device /dev/vbi%d [v4l2] (Not Working Yet!)\n", 1502 printk(KERN_INFO "USBVision[%d]: registered USBVision VBI device %s [v4l2] (Not Working Yet!)\n",
1503 usbvision->nr, usbvision->vbi->num); 1503 usbvision->nr, video_device_node_name(usbvision->vbi));
1504 } 1504 }
1505 // all done 1505 // all done
1506 return 0; 1506 return 0;
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index 7705fc6baf00..48f5a628c065 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -1148,7 +1148,8 @@ static int vivi_open(struct file *file)
1148 return -EBUSY; 1148 return -EBUSY;
1149 } 1149 }
1150 1150
1151 dprintk(dev, 1, "open /dev/video%d type=%s users=%d\n", dev->vfd->num, 1151 dprintk(dev, 1, "open %s type=%s users=%d\n",
1152 video_device_node_name(dev->vfd),
1152 v4l2_type_names[V4L2_BUF_TYPE_VIDEO_CAPTURE], dev->users); 1153 v4l2_type_names[V4L2_BUF_TYPE_VIDEO_CAPTURE], dev->users);
1153 1154
1154 /* allocate + initialize per filehandle data */ 1155 /* allocate + initialize per filehandle data */
@@ -1317,8 +1318,8 @@ static int vivi_release(void)
1317 list_del(list); 1318 list_del(list);
1318 dev = list_entry(list, struct vivi_dev, vivi_devlist); 1319 dev = list_entry(list, struct vivi_dev, vivi_devlist);
1319 1320
1320 v4l2_info(&dev->v4l2_dev, "unregistering /dev/video%d\n", 1321 v4l2_info(&dev->v4l2_dev, "unregistering %s\n",
1321 dev->vfd->num); 1322 video_device_node_name(dev->vfd));
1322 video_unregister_device(dev->vfd); 1323 video_unregister_device(dev->vfd);
1323 v4l2_device_unregister(&dev->v4l2_dev); 1324 v4l2_device_unregister(&dev->v4l2_dev);
1324 kfree(dev); 1325 kfree(dev);
@@ -1379,8 +1380,8 @@ static int __init vivi_create_instance(int inst)
1379 video_nr++; 1380 video_nr++;
1380 1381
1381 dev->vfd = vfd; 1382 dev->vfd = vfd;
1382 v4l2_info(&dev->v4l2_dev, "V4L2 device registered as /dev/video%d\n", 1383 v4l2_info(&dev->v4l2_dev, "V4L2 device registered as %s\n",
1383 vfd->num); 1384 video_device_node_name(vfd));
1384 return 0; 1385 return 0;
1385 1386
1386rel_vdev: 1387rel_vdev:
diff --git a/drivers/media/video/w9968cf.c b/drivers/media/video/w9968cf.c
index 37fcdc447db5..695ad2f46095 100644
--- a/drivers/media/video/w9968cf.c
+++ b/drivers/media/video/w9968cf.c
@@ -2323,9 +2323,9 @@ static int w9968cf_sensor_init(struct w9968cf_device* cam)
2323error: 2323error:
2324 cam->sensor_initialized = 0; 2324 cam->sensor_initialized = 0;
2325 cam->sensor = CC_UNKNOWN; 2325 cam->sensor = CC_UNKNOWN;
2326 DBG(1, "Image sensor initialization failed for %s (/dev/video%d). " 2326 DBG(1, "Image sensor initialization failed for %s (%s). "
2327 "Try to detach and attach this device again", 2327 "Try to detach and attach this device again",
2328 symbolic(camlist, cam->id), cam->v4ldev->num) 2328 symbolic(camlist, cam->id), video_device_node_name(cam->v4ldev))
2329 return err; 2329 return err;
2330} 2330}
2331 2331
@@ -2571,7 +2571,8 @@ static void w9968cf_release_resources(struct w9968cf_device* cam)
2571{ 2571{
2572 mutex_lock(&w9968cf_devlist_mutex); 2572 mutex_lock(&w9968cf_devlist_mutex);
2573 2573
2574 DBG(2, "V4L device deregistered: /dev/video%d", cam->v4ldev->num) 2574 DBG(2, "V4L device deregistered: %s",
2575 video_device_node_name(cam->v4ldev))
2575 2576
2576 video_unregister_device(cam->v4ldev); 2577 video_unregister_device(cam->v4ldev);
2577 list_del(&cam->v4llist); 2578 list_del(&cam->v4llist);
@@ -2605,17 +2606,19 @@ static int w9968cf_open(struct file *filp)
2605 2606
2606 if (cam->sensor == CC_UNKNOWN) { 2607 if (cam->sensor == CC_UNKNOWN) {
2607 DBG(2, "No supported image sensor has been detected by the " 2608 DBG(2, "No supported image sensor has been detected by the "
2608 "'ovcamchip' module for the %s (/dev/video%d). Make " 2609 "'ovcamchip' module for the %s (%s). Make sure "
2609 "sure it is loaded *before* (re)connecting the camera.", 2610 "it is loaded *before* (re)connecting the camera.",
2610 symbolic(camlist, cam->id), cam->v4ldev->num) 2611 symbolic(camlist, cam->id),
2612 video_device_node_name(cam->v4ldev))
2611 mutex_unlock(&cam->dev_mutex); 2613 mutex_unlock(&cam->dev_mutex);
2612 up_read(&w9968cf_disconnect); 2614 up_read(&w9968cf_disconnect);
2613 return -ENODEV; 2615 return -ENODEV;
2614 } 2616 }
2615 2617
2616 if (cam->users) { 2618 if (cam->users) {
2617 DBG(2, "%s (/dev/video%d) has been already occupied by '%s'", 2619 DBG(2, "%s (%s) has been already occupied by '%s'",
2618 symbolic(camlist, cam->id), cam->v4ldev->num, cam->command) 2620 symbolic(camlist, cam->id),
2621 video_device_node_name(cam->v4ldev), cam->command)
2619 if ((filp->f_flags & O_NONBLOCK)||(filp->f_flags & O_NDELAY)) { 2622 if ((filp->f_flags & O_NONBLOCK)||(filp->f_flags & O_NDELAY)) {
2620 mutex_unlock(&cam->dev_mutex); 2623 mutex_unlock(&cam->dev_mutex);
2621 up_read(&w9968cf_disconnect); 2624 up_read(&w9968cf_disconnect);
@@ -2636,8 +2639,8 @@ static int w9968cf_open(struct file *filp)
2636 mutex_lock(&cam->dev_mutex); 2639 mutex_lock(&cam->dev_mutex);
2637 } 2640 }
2638 2641
2639 DBG(5, "Opening '%s', /dev/video%d ...", 2642 DBG(5, "Opening '%s', %s ...",
2640 symbolic(camlist, cam->id), cam->v4ldev->num) 2643 symbolic(camlist, cam->id), video_device_node_name(cam->v4ldev))
2641 2644
2642 cam->streaming = 0; 2645 cam->streaming = 0;
2643 cam->misconfigured = 0; 2646 cam->misconfigured = 0;
@@ -3501,7 +3504,8 @@ w9968cf_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
3501 goto fail; 3504 goto fail;
3502 } 3505 }
3503 3506
3504 DBG(2, "V4L device registered as /dev/video%d", cam->v4ldev->num) 3507 DBG(2, "V4L device registered as %s",
3508 video_device_node_name(cam->v4ldev))
3505 3509
3506 /* Set some basic constants */ 3510 /* Set some basic constants */
3507 w9968cf_configure_camera(cam, udev, mod_id, dev_nr); 3511 w9968cf_configure_camera(cam, udev, mod_id, dev_nr);
@@ -3557,10 +3561,10 @@ static void w9968cf_usb_disconnect(struct usb_interface* intf)
3557 wake_up_interruptible_all(&cam->open); 3561 wake_up_interruptible_all(&cam->open);
3558 3562
3559 if (cam->users) { 3563 if (cam->users) {
3560 DBG(2, "The device is open (/dev/video%d)! " 3564 DBG(2, "The device is open (%s)! "
3561 "Process name: %s. Deregistration and memory " 3565 "Process name: %s. Deregistration and memory "
3562 "deallocation are deferred on close.", 3566 "deallocation are deferred on close.",
3563 cam->v4ldev->num, cam->command) 3567 video_device_node_name(cam->v4ldev), cam->command)
3564 cam->misconfigured = 1; 3568 cam->misconfigured = 1;
3565 w9968cf_stop_transfer(cam); 3569 w9968cf_stop_transfer(cam);
3566 wake_up_interruptible(&cam->wait_queue); 3570 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 312a71336fd0..524eb754c97d 100644
--- a/drivers/media/video/zc0301/zc0301_core.c
+++ b/drivers/media/video/zc0301/zc0301_core.c
@@ -538,8 +538,8 @@ static int zc0301_stream_interrupt(struct zc0301_device* cam)
538 else if (cam->stream != STREAM_OFF) { 538 else if (cam->stream != STREAM_OFF) {
539 cam->state |= DEV_MISCONFIGURED; 539 cam->state |= DEV_MISCONFIGURED;
540 DBG(1, "URB timeout reached. The camera is misconfigured. To " 540 DBG(1, "URB timeout reached. The camera is misconfigured. To "
541 "use it, close and open /dev/video%d again.", 541 "use it, close and open %s again.",
542 cam->v4ldev->num); 542 video_device_node_name(cam->v4ldev));
543 return -EIO; 543 return -EIO;
544 } 544 }
545 545
@@ -640,7 +640,8 @@ static void zc0301_release_resources(struct kref *kref)
640{ 640{
641 struct zc0301_device *cam = container_of(kref, struct zc0301_device, 641 struct zc0301_device *cam = container_of(kref, struct zc0301_device,
642 kref); 642 kref);
643 DBG(2, "V4L2 device /dev/video%d deregistered", cam->v4ldev->num); 643 DBG(2, "V4L2 device %s deregistered",
644 video_device_node_name(cam->v4ldev));
644 video_set_drvdata(cam->v4ldev, NULL); 645 video_set_drvdata(cam->v4ldev, NULL);
645 video_unregister_device(cam->v4ldev); 646 video_unregister_device(cam->v4ldev);
646 usb_put_dev(cam->usbdev); 647 usb_put_dev(cam->usbdev);
@@ -679,7 +680,8 @@ static int zc0301_open(struct file *filp)
679 } 680 }
680 681
681 if (cam->users) { 682 if (cam->users) {
682 DBG(2, "Device /dev/video%d is busy...", cam->v4ldev->num); 683 DBG(2, "Device %s is busy...",
684 video_device_node_name(cam->v4ldev));
683 DBG(3, "Simultaneous opens are not supported"); 685 DBG(3, "Simultaneous opens are not supported");
684 if ((filp->f_flags & O_NONBLOCK) || 686 if ((filp->f_flags & O_NONBLOCK) ||
685 (filp->f_flags & O_NDELAY)) { 687 (filp->f_flags & O_NDELAY)) {
@@ -722,7 +724,8 @@ static int zc0301_open(struct file *filp)
722 cam->frame_count = 0; 724 cam->frame_count = 0;
723 zc0301_empty_framequeues(cam); 725 zc0301_empty_framequeues(cam);
724 726
725 DBG(3, "Video device /dev/video%d is open", cam->v4ldev->num); 727 DBG(3, "Video device %s is open",
728 video_device_node_name(cam->v4ldev));
726 729
727out: 730out:
728 mutex_unlock(&cam->open_mutex); 731 mutex_unlock(&cam->open_mutex);
@@ -746,7 +749,8 @@ static int zc0301_release(struct file *filp)
746 cam->users--; 749 cam->users--;
747 wake_up_interruptible_nr(&cam->wait_open, 1); 750 wake_up_interruptible_nr(&cam->wait_open, 1);
748 751
749 DBG(3, "Video device /dev/video%d closed", cam->v4ldev->num); 752 DBG(3, "Video device %s closed",
753 video_device_node_name(cam->v4ldev));
750 754
751 kref_put(&cam->kref, zc0301_release_resources); 755 kref_put(&cam->kref, zc0301_release_resources);
752 756
@@ -1276,8 +1280,8 @@ zc0301_vidioc_s_crop(struct zc0301_device* cam, void __user * arg)
1276 if (err) { /* atomic, no rollback in ioctl() */ 1280 if (err) { /* atomic, no rollback in ioctl() */
1277 cam->state |= DEV_MISCONFIGURED; 1281 cam->state |= DEV_MISCONFIGURED;
1278 DBG(1, "VIDIOC_S_CROP failed because of hardware problems. To " 1282 DBG(1, "VIDIOC_S_CROP failed because of hardware problems. To "
1279 "use the camera, close and open /dev/video%d again.", 1283 "use the camera, close and open %s again.",
1280 cam->v4ldev->num); 1284 video_device_node_name(cam->v4ldev));
1281 return -EIO; 1285 return -EIO;
1282 } 1286 }
1283 1287
@@ -1289,8 +1293,8 @@ zc0301_vidioc_s_crop(struct zc0301_device* cam, void __user * arg)
1289 nbuffers != zc0301_request_buffers(cam, nbuffers, cam->io)) { 1293 nbuffers != zc0301_request_buffers(cam, nbuffers, cam->io)) {
1290 cam->state |= DEV_MISCONFIGURED; 1294 cam->state |= DEV_MISCONFIGURED;
1291 DBG(1, "VIDIOC_S_CROP failed because of not enough memory. To " 1295 DBG(1, "VIDIOC_S_CROP failed because of not enough memory. To "
1292 "use the camera, close and open /dev/video%d again.", 1296 "use the camera, close and open %s again.",
1293 cam->v4ldev->num); 1297 video_device_node_name(cam->v4ldev));
1294 return -ENOMEM; 1298 return -ENOMEM;
1295 } 1299 }
1296 1300
@@ -1471,8 +1475,8 @@ zc0301_vidioc_try_s_fmt(struct zc0301_device* cam, unsigned int cmd,
1471 if (err) { /* atomic, no rollback in ioctl() */ 1475 if (err) { /* atomic, no rollback in ioctl() */
1472 cam->state |= DEV_MISCONFIGURED; 1476 cam->state |= DEV_MISCONFIGURED;
1473 DBG(1, "VIDIOC_S_FMT failed because of hardware problems. To " 1477 DBG(1, "VIDIOC_S_FMT failed because of hardware problems. To "
1474 "use the camera, close and open /dev/video%d again.", 1478 "use the camera, close and open %s again.",
1475 cam->v4ldev->num); 1479 video_device_node_name(cam->v4ldev));
1476 return -EIO; 1480 return -EIO;
1477 } 1481 }
1478 1482
@@ -1483,8 +1487,8 @@ zc0301_vidioc_try_s_fmt(struct zc0301_device* cam, unsigned int cmd,
1483 nbuffers != zc0301_request_buffers(cam, nbuffers, cam->io)) { 1487 nbuffers != zc0301_request_buffers(cam, nbuffers, cam->io)) {
1484 cam->state |= DEV_MISCONFIGURED; 1488 cam->state |= DEV_MISCONFIGURED;
1485 DBG(1, "VIDIOC_S_FMT failed because of not enough memory. To " 1489 DBG(1, "VIDIOC_S_FMT failed because of not enough memory. To "
1486 "use the camera, close and open /dev/video%d again.", 1490 "use the camera, close and open %s again.",
1487 cam->v4ldev->num); 1491 video_device_node_name(cam->v4ldev));
1488 return -ENOMEM; 1492 return -ENOMEM;
1489 } 1493 }
1490 1494
@@ -1530,8 +1534,8 @@ zc0301_vidioc_s_jpegcomp(struct zc0301_device* cam, void __user * arg)
1530 if (err) { /* atomic, no rollback in ioctl() */ 1534 if (err) { /* atomic, no rollback in ioctl() */
1531 cam->state |= DEV_MISCONFIGURED; 1535 cam->state |= DEV_MISCONFIGURED;
1532 DBG(1, "VIDIOC_S_JPEGCOMP failed because of hardware " 1536 DBG(1, "VIDIOC_S_JPEGCOMP failed because of hardware "
1533 "problems. To use the camera, close and open " 1537 "problems. To use the camera, close and open %s again.",
1534 "/dev/video%d again.", cam->v4ldev->num); 1538 video_device_node_name(cam->v4ldev));
1535 return -EIO; 1539 return -EIO;
1536 } 1540 }
1537 1541
@@ -2003,7 +2007,8 @@ zc0301_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
2003 goto fail; 2007 goto fail;
2004 } 2008 }
2005 2009
2006 DBG(2, "V4L2 device registered as /dev/video%d", cam->v4ldev->num); 2010 DBG(2, "V4L2 device registered as %s",
2011 video_device_node_name(cam->v4ldev));
2007 2012
2008 cam->module_param.force_munmap = force_munmap[dev_nr]; 2013 cam->module_param.force_munmap = force_munmap[dev_nr];
2009 cam->module_param.frame_timeout = frame_timeout[dev_nr]; 2014 cam->module_param.frame_timeout = frame_timeout[dev_nr];
@@ -2040,9 +2045,9 @@ static void zc0301_usb_disconnect(struct usb_interface* intf)
2040 DBG(2, "Disconnecting %s...", cam->v4ldev->name); 2045 DBG(2, "Disconnecting %s...", cam->v4ldev->name);
2041 2046
2042 if (cam->users) { 2047 if (cam->users) {
2043 DBG(2, "Device /dev/video%d is open! Deregistration and " 2048 DBG(2, "Device %s is open! Deregistration and "
2044 "memory deallocation are deferred.", 2049 "memory deallocation are deferred.",
2045 cam->v4ldev->num); 2050 video_device_node_name(cam->v4ldev));
2046 cam->state |= DEV_MISCONFIGURED; 2051 cam->state |= DEV_MISCONFIGURED;
2047 zc0301_stop_transfer(cam); 2052 zc0301_stop_transfer(cam);
2048 cam->state |= DEV_DISCONNECTED; 2053 cam->state |= DEV_DISCONNECTED;
diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c
index 2ef110b5221b..69ea6df62ab2 100644
--- a/drivers/media/video/zr364xx.c
+++ b/drivers/media/video/zr364xx.c
@@ -1635,8 +1635,8 @@ static int zr364xx_probe(struct usb_interface *intf,
1635 1635
1636 spin_lock_init(&cam->slock); 1636 spin_lock_init(&cam->slock);
1637 1637
1638 dev_info(&udev->dev, DRIVER_DESC " controlling video device %d\n", 1638 dev_info(&udev->dev, DRIVER_DESC " controlling device %s\n",
1639 cam->vdev->num); 1639 video_device_node_name(cam->vdev));
1640 return 0; 1640 return 0;
1641} 1641}
1642 1642
diff --git a/drivers/staging/go7007/go7007-v4l2.c b/drivers/staging/go7007/go7007-v4l2.c
index b18d8e2d4c5e..fe739752c92d 100644
--- a/drivers/staging/go7007/go7007-v4l2.c
+++ b/drivers/staging/go7007/go7007-v4l2.c
@@ -1817,8 +1817,8 @@ int go7007_v4l2_init(struct go7007 *go)
1817 } 1817 }
1818 video_set_drvdata(go->video_dev, go); 1818 video_set_drvdata(go->video_dev, go);
1819 ++go->ref_count; 1819 ++go->ref_count;
1820 printk(KERN_INFO "%s: registered device video%d [v4l2]\n", 1820 printk(KERN_INFO "%s: registered device %s [v4l2]\n",
1821 go->video_dev->name, go->video_dev->num); 1821 go->video_dev->name, video_device_node_name(go->video_dev));
1822 1822
1823 return 0; 1823 return 0;
1824} 1824}