patch-2.4.0-test11 linux/drivers/net/de620.c
Next file: linux/drivers/net/e2100.c
Previous file: linux/drivers/net/de600.c
Back to the patch index
Back to the overall index
- Lines: 51
- Date:
Thu Nov 16 12:51:28 2000
- Orig file:
v2.4.0-test10/linux/drivers/net/de620.c
- Orig date:
Mon Jun 19 13:30:57 2000
diff -u --recursive --new-file v2.4.0-test10/linux/drivers/net/de620.c linux/drivers/net/de620.c
@@ -437,15 +437,15 @@
*/
static int de620_open(struct net_device *dev)
{
- if (request_irq(dev->irq, de620_interrupt, 0, "de620", dev)) {
+ int ret = request_irq(dev->irq, de620_interrupt, 0, dev->name, dev);
+ if (ret) {
printk (KERN_ERR "%s: unable to get IRQ %d\n", dev->name, dev->irq);
- return 1;
+ return ret;
}
if (adapter_init(dev))
- return 1;
+ return -EIO;
- MOD_INC_USE_COUNT;
netif_start_queue(dev);
return 0;
}
@@ -462,7 +462,6 @@
/* disable recv */
de620_set_register(dev, W_TCR, RXOFF);
free_irq(dev->irq, dev);
- MOD_DEC_USE_COUNT;
return 0;
}
@@ -812,6 +811,8 @@
int i;
byte checkbyte = 0xa5;
+ SET_MODULE_OWNER(dev);
+
/*
* This is where the base_addr and irq gets set.
* Tunable at compile-time and insmod-time
@@ -985,11 +986,11 @@
*
*/
#ifdef MODULE
-static struct net_device de620_dev = {
- "", 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, de620_probe };
+static struct net_device de620_dev;
int init_module(void)
{
+ de620_dev.init = de620_probe;
if (register_netdev(&de620_dev) != 0)
return -EIO;
return 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)