aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-v4l2.c')
-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,