aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cpia.c
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/cpia.c
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/cpia.c')
-rw-r--r--drivers/media/video/cpia.c13
1 files changed, 4 insertions, 9 deletions
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) {