patch-2.3.99-pre4 linux/drivers/char/videodev.c

Next file: linux/drivers/char/wd501p.h
Previous file: linux/drivers/char/tuner.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre3/linux/drivers/char/videodev.c linux/drivers/char/videodev.c
@@ -47,6 +47,9 @@
 #ifdef CONFIG_VIDEO_BWQCAM
 extern int init_bw_qcams(struct video_init *);
 #endif
+#ifdef CONFIG_VIDEO_CPIA
+extern int cpia_init(struct video_init *);
+#endif
 #ifdef CONFIG_VIDEO_PLANB
 extern int init_planbs(struct video_init *);
 #endif
@@ -62,6 +65,9 @@
 #ifdef CONFIG_VIDEO_BWQCAM
 	{"bw-qcam", init_bw_qcams},
 #endif	
+#ifdef CONFIG_VIDEO_CPIA
+	{"cpia", cpia_init},
+#endif	
 #ifdef CONFIG_VIDEO_PLANB
 	{"planb", init_planbs},
 #endif
@@ -133,9 +139,11 @@
 	if(vfl==NULL) {
 		char modname[20];
 
+		MOD_INC_USE_COUNT;
 		sprintf (modname, "char-major-%d-%d", VIDEO_MAJOR, minor);
 		request_module(modname);
 		vfl=video_device[minor];
+		MOD_DEC_USE_COUNT;
 		if (vfl==NULL)
 			return -ENODEV;
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)