patch-2.4.2 linux/drivers/acorn/net/etherh.c

Next file: linux/drivers/acorn/scsi/Makefile
Previous file: linux/drivers/acorn/net/ether3.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.1/linux/drivers/acorn/net/etherh.c linux/drivers/acorn/net/etherh.c
@@ -36,7 +36,7 @@
 #include <linux/ptrace.h>
 #include <linux/ioport.h>
 #include <linux/in.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/errno.h>
 #include <linux/netdevice.h>
@@ -67,7 +67,7 @@
 MODULE_AUTHOR("Russell King");
 MODULE_DESCRIPTION("i3 EtherH driver");
 
-static char version[] __initdata =
+static const char version[] __initdata =
 	"etherh [500/600/600A] ethernet driver (c) 2000 R.M.King v1.07\n";
 
 #define ETHERH500_DATAPORT	0x200	/* MEMC */
@@ -363,12 +363,8 @@
 static int
 etherh_open(struct net_device *dev)
 {
-	MOD_INC_USE_COUNT;
-
-	if (request_irq(dev->irq, ei_interrupt, 0, "etherh", dev)) {
-		MOD_DEC_USE_COUNT;
+	if (request_irq(dev->irq, ei_interrupt, 0, "etherh", dev))
 		return -EAGAIN;
-	}
 
 	/*
 	 * Make sure that we aren't going to change the
@@ -406,8 +402,6 @@
 {
 	ei_close (dev);
 	free_irq (dev->irq, dev);
-
-	MOD_DEC_USE_COUNT;
 	return 0;
 }
 
@@ -424,12 +418,8 @@
 }
 
 static expansioncard_ops_t etherh_ops = {
-	etherh_irq_enable,
-	etherh_irq_disable,
-	NULL,
-	NULL,
-	NULL,
-	NULL
+	irqenable:	etherh_irq_enable,
+	irqdisable:	etherh_irq_disable,
 };
 
 /*
@@ -508,6 +498,8 @@
 	dev = init_etherdev(NULL, 0);
 	if (!dev)
 		goto out;
+
+	SET_MODULE_OWNER(dev);
 
 	etherh_addr(dev->dev_addr, ec);
 

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