vserver 1.9.5.x5
[linux-2.6.git] / drivers / net / 82596.c
index 92cf5e0..65f97b1 100644 (file)
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
 #include <linux/init.h>
+#include <linux/bitops.h>
 
-#include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/dma.h>
 #include <asm/pgtable.h>
-#include <asm/pgalloc.h>
 
 static char version[] __initdata =
        "82596.c $Revision: 1.5 $\n";
 
+#define DRV_NAME       "82596"
+
 /* DEBUG flags
  */
 
@@ -149,7 +150,7 @@ MODULE_AUTHOR("Richard Hirst");
 MODULE_DESCRIPTION("i82596 driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(i596_debug, "i");
+module_param(i596_debug, int, 0);
 MODULE_PARM_DESC(i596_debug, "i82596 debug mask");
 
 
@@ -618,7 +619,7 @@ static int init_i596_mem(struct net_device *dev)
 #endif
        unsigned long flags;
 
-       MPU_PORT(dev, PORT_RESET, 0);
+       MPU_PORT(dev, PORT_RESET, NULL);
 
        udelay(100);            /* Wait 100us - seems to help */
 
@@ -759,7 +760,7 @@ static int init_i596_mem(struct net_device *dev)
 
 failed:
        printk(KERN_CRIT "%s: Failed to initialise 82596\n", dev->name);
-       MPU_PORT(dev, PORT_RESET, 0);
+       MPU_PORT(dev, PORT_RESET, NULL);
        return -1;
 }
 
@@ -1191,7 +1192,7 @@ struct net_device * __init i82596_probe(int unit)
                /* this is easy the ethernet interface can only be at 0x300 */
                /* first check nothing is already registered here */
 
-               if (!request_region(ioaddr, I596_TOTAL_SIZE, dev->name)) {
+               if (!request_region(ioaddr, I596_TOTAL_SIZE, DRV_NAME)) {
                        printk(KERN_ERR "82596: IO address 0x%04x in use\n", ioaddr);
                        err = -EBUSY;
                        goto out;
@@ -1259,7 +1260,7 @@ struct net_device * __init i82596_probe(int unit)
        lp->scb.command = 0;
        lp->scb.cmd = I596_NULL;
        lp->scb.rfd = I596_NULL;
-       lp->lock = SPIN_LOCK_UNLOCKED;
+       spin_lock_init(&lp->lock);
 
        err = register_netdev(dev);
        if (err)
@@ -1571,13 +1572,13 @@ static void set_multicast_list(struct net_device *dev)
 static struct net_device *dev_82596;
 
 #ifdef ENABLE_APRICOT
-MODULE_PARM(irq, "i");
+module_param(irq, int, 0);
 MODULE_PARM_DESC(irq, "Apricot IRQ number");
 #endif
 
-MODULE_PARM(debug, "i");
-MODULE_PARM_DESC(debug, "i82596 debug mask");
 static int debug = -1;
+module_param(debug, int, 0);
+MODULE_PARM_DESC(debug, "i82596 debug mask");
 
 int init_module(void)
 {