patch-2.4.0-test12 linux/drivers/net/sb1000.c
Next file: linux/drivers/net/setup.c
Previous file: linux/drivers/net/rclanmtl.c
Back to the patch index
Back to the overall index
- Lines: 52
- Date:
Mon Dec 11 13:38:29 2000
- Orig file:
v2.4.0-test11/linux/drivers/net/sb1000.c
- Orig date:
Tue Jul 18 16:09:27 2000
diff -u --recursive --new-file v2.4.0-test11/linux/drivers/net/sb1000.c linux/drivers/net/sb1000.c
@@ -210,6 +210,9 @@
dev->rmem_end, serial_number, dev->irq);
dev = init_etherdev(dev, 0);
+ if (!dev)
+ return -ENOMEM;
+ SET_MODULE_OWNER(dev);
/* Make up a SB1000-specific-data structure. */
dev->priv = kmalloc(sizeof(struct sb1000_private), GFP_KERNEL);
@@ -1004,7 +1007,6 @@
netif_start_queue(dev);
- MOD_INC_USE_COUNT;
return 0; /* Always succeed */
}
@@ -1195,7 +1197,6 @@
dev_kfree_skb(lp->rx_skb[i]);
}
}
- MOD_DEC_USE_COUNT;
return 0;
}
@@ -1205,14 +1206,9 @@
MODULE_PARM(io, "1-2i");
MODULE_PARM(irq, "i");
-static struct net_device dev_sb1000 = {
- "",
- 0, 0, 0, 0,
- 0, 0,
- 0, 0, 0, NULL, sb1000_probe };
-
-static int io[2] = {0, 0};
-static int irq = 0;
+static struct net_device dev_sb1000;
+static int io[2];
+static int irq;
int
init_module(void)
@@ -1226,6 +1222,7 @@
printk(KERN_ERR "sb1000: can't register any device cm<n>\n");
return -ENFILE;
}
+ dev_sb1000.init = sb1000_probe;
dev_sb1000.base_addr = io[0];
/* rmem_end holds the second I/O address - fv */
dev_sb1000.rmem_end = io[1];
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)