patch-2.4.0-test9 linux/drivers/net/3c507.c
Next file: linux/drivers/net/3c509.c
Previous file: linux/drivers/net/3c505.c
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Sun Sep 17 09:41:28 2000
- Orig file:
v2.4.0-test8/linux/drivers/net/3c507.c
- Orig date:
Mon Jun 19 13:30:56 2000
diff -u --recursive --new-file v2.4.0-test8/linux/drivers/net/3c507.c linux/drivers/net/3c507.c
@@ -332,6 +332,7 @@
{
static unsigned char init_ID_done = 0, version_printed = 0;
int i, irq, irqval;
+ struct net_local *lp;
if (init_ID_done == 0) {
ushort lrs_state = 0xff;
@@ -355,7 +356,7 @@
/* Allocate a new 'dev' if needed. */
if (dev == NULL)
- dev = init_etherdev(0, sizeof(struct net_local));
+ dev = init_etherdev(0, 0);
if (net_debug && version_printed++ == 0)
printk(version);
@@ -417,10 +418,11 @@
printk(version);
/* Initialize the device structure. */
- dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL);
+ lp = dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL);
if (dev->priv == NULL)
return -ENOMEM;
memset(dev->priv, 0, sizeof(struct net_local));
+ spin_lock_init(&lp->lock);
dev->open = el16_open;
dev->stop = el16_close;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)