patch-2.4.0-test11 linux/drivers/net/atari_pamsnet.c

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

diff -u --recursive --new-file v2.4.0-test10/linux/drivers/net/atari_pamsnet.c linux/drivers/net/atari_pamsnet.c
@@ -561,7 +561,7 @@
 /* Check for a network adaptor of this type, and return '0' if one exists.
  */
 
-extern int __init 
+int __init 
 pamsnet_probe (dev)
 	struct net_device *dev;
 {
@@ -576,6 +576,8 @@
 	if (no_more_found)
 		return -ENODEV;
 
+	SET_MODULE_OWNER(dev);
+
 	no_more_found = 1;
 
 	printk("Probing for PAM's Net/GK Adapter...\n");
@@ -686,7 +688,6 @@
 	pamsnet_timer.data = (long)dev;
 	pamsnet_timer.expires = jiffies + lp->poll_time;
 	add_timer(&pamsnet_timer);
-	MOD_INC_USE_COUNT;
 	return 0;
 }
 
@@ -848,7 +849,6 @@
 
 	ENABLE_IRQ();
 	stdma_release();
-	MOD_DEC_USE_COUNT;
 	return 0;
 }
 
@@ -864,19 +864,13 @@
 
 #ifdef MODULE
 
-static char devicename[9] = { 0, };
-static struct net_device pam_dev =
-	{
-		devicename,	/* filled in by register_netdev() */
-		0, 0, 0, 0,	/* memory */
-		0, 0,		/* base, irq */
-		0, 0, 0, NULL, pamsnet_probe,
-	};
+static struct net_device pam_dev;
 
 int
 init_module(void) {
 	int err;
 
+	pam_dev.init = pamsnet_probe;
 	if ((err = register_netdev(&pam_dev))) {
 		if (err == -EEXIST)  {
 			printk("PAM's Net/GK: devices already present. Module not loaded.\n");

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