aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2
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/pvrusb2
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/pvrusb2')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-v4l2.c21
1 files changed, 4 insertions, 17 deletions
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,