#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
*/
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");
#endif
unsigned long flags;
- MPU_PORT(dev, PORT_RESET, 0);
+ MPU_PORT(dev, PORT_RESET, NULL);
udelay(100); /* Wait 100us - seems to help */
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;
}
/* 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;
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)
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)
{