patch-2.4.5 linux/drivers/usb/ibmcam.c

Next file: linux/drivers/usb/inode.c
Previous file: linux/drivers/usb/hid.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.4/linux/drivers/usb/ibmcam.c linux/drivers/usb/ibmcam.c
@@ -43,9 +43,18 @@
 
 #include "ibmcam.h"
 
+/*
+ * Version Information
+ */
+#define DRIVER_VERSION "v1.0.0"
+#define DRIVER_AUTHOR "http://www.linux-usb.org/ibmcam/"
+#define DRIVER_DESC "IBM/Xirlink C-it USB Camera Driver for Linux (c) 2000"
+
 #define	ENABLE_HEXDUMP	0	/* Enable if you need it */
 static int debug = 0;
 
+static int video_nr = -1;
+
 /* Completion states of the data parser */
 typedef enum {
 	scan_Continue,		/* Just parse next item */
@@ -159,9 +168,6 @@
 MODULE_PARM(init_model2_yb, "i");
 MODULE_PARM_DESC(init_model2_yb, "Model2 preconfiguration: 0-255 (default=160)");
 
-MODULE_AUTHOR ("module author");
-MODULE_DESCRIPTION ("IBM/Xirlink C-it USB Camera Driver for Linux (c) 2000");
-
 /* Still mysterious i2c commands */
 static const unsigned short unknown_88 = 0x0088;
 static const unsigned short unknown_89 = 0x0089;
@@ -3032,7 +3038,7 @@
 	usb_ibmcam_configure_video(ibmcam);
 	up (&ibmcam->lock);
 
-	if (video_register_device(&ibmcam->vdev, VFL_TYPE_GRABBER) == -1) {
+	if (video_register_device(&ibmcam->vdev, VFL_TYPE_GRABBER, video_nr) == -1) {
 		printk(KERN_ERR "video_register_device failed\n");
 		ibmcam = NULL; /* Do not free, it's preallocated */
 	}
@@ -3141,6 +3147,8 @@
 		struct usb_ibmcam *ibmcam = &cams[u];
 		memset (ibmcam, 0, sizeof(struct usb_ibmcam));
 	}
+	info(DRIVER_VERSION " " DRIVER_AUTHOR);
+	info(DRIVER_DESC);
 	return usb_register(&ibmcam_driver);
 }
 
@@ -3151,5 +3159,8 @@
 
 module_init(usb_ibmcam_init);
 module_exit(usb_ibmcam_cleanup);
+
+MODULE_AUTHOR( DRIVER_AUTHOR );
+MODULE_DESCRIPTION( DRIVER_DESC );
 
 

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