patch-2.4.4 linux/drivers/net/epic100.c

Next file: linux/drivers/net/eql.c
Previous file: linux/drivers/net/eepro.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.3/linux/drivers/net/epic100.c linux/drivers/net/epic100.c
@@ -43,14 +43,6 @@
 
 */
 
-/* These identify the driver base version and may not be removed. */
-static const char version[] =
-"epic100.c:v1.11 1/7/2001 Written by Donald Becker <becker@scyld.com>\n";
-static const char version2[] =
-"  http://www.scyld.com/network/epic100.html\n";
-static const char version3[] =
-" (unofficial 2.4.x kernel port, version 1.1.6, January 11, 2001)\n";
-
 /* The user-configurable values.
    These may be modified when a driver module is loaded.*/
 
@@ -115,6 +107,14 @@
 #include <asm/bitops.h>
 #include <asm/io.h>
 
+/* These identify the driver base version and may not be removed. */
+static char version[] __devinitdata =
+"epic100.c:v1.11 1/7/2001 Written by Donald Becker <becker@scyld.com>\n";
+static char version2[] __devinitdata =
+"  http://www.scyld.com/network/epic100.html\n";
+static char version3[] __devinitdata =
+"  (unofficial 2.4.x kernel port, version 1.1.7, April 17, 2001)\n";
+
 MODULE_AUTHOR("Donald Becker <becker@scyld.com>");
 MODULE_DESCRIPTION("SMC 83c170 EPIC series Ethernet driver");
 MODULE_PARM(debug, "i");
@@ -337,7 +337,6 @@
 				    const struct pci_device_id *ent)
 {
 	static int card_idx = -1;
-	static int printed_version;
 	long ioaddr;
 	int chip_idx = (int) ent->driver_data;
 	int irq;
@@ -347,11 +346,15 @@
 	void *ring_space;
 	dma_addr_t ring_dma;
 
-	card_idx++;
-	
+/* when built into the kernel, we only print version if device is found */
+#ifndef MODULE
+	static int printed_version;
 	if (!printed_version++)
 		printk (KERN_INFO "%s" KERN_INFO "%s" KERN_INFO "%s",
 			version, version2, version3);
+#endif
+	
+	card_idx++;
 	
 	i = pci_enable_device(pdev);
 	if (i)
@@ -1440,6 +1443,12 @@
 
 static int __init epic_init (void)
 {
+/* when a module, this is printed whether or not devices are found in probe */
+#ifdef MODULE
+	printk (KERN_INFO "%s" KERN_INFO "%s" KERN_INFO "%s",
+		version, version2, version3);
+#endif
+
 	return pci_module_init (&epic_driver);
 }
 

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