patch-2.3.4 linux/drivers/net/arcnet.c
Next file: linux/drivers/net/cosa.c
Previous file: linux/drivers/net/Space.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Tue May 25 13:06:34 1999
- Orig file:
v2.3.3/linux/drivers/net/arcnet.c
- Orig date:
Mon Sep 14 11:32:22 1998
diff -u --recursive --new-file v2.3.3/linux/drivers/net/arcnet.c linux/drivers/net/arcnet.c
@@ -2023,8 +2023,10 @@
for (c=0; c< (arcnet_num_devs-1); c++)
arcnet_devs[c].next=&arcnet_devs[c+1];
+ write_lock_bh(&dev_base_lock);
arcnet_devs[c].next=dev_base;
dev_base=&arcnet_devs[0];
+ write_unlock_bh(&dev_base_lock);
/* Give names to those without them */
@@ -2078,9 +2080,11 @@
for (;;)
{
sprintf(device, "arc%d", arcnum);
+ read_lock_bh(&dev_base_lock);
for (dev = dev_base; dev; dev=dev->next)
if (dev->name != device && !strcmp(dev->name, device))
break;
+ read_unlock_bh(&dev_base_lock);
if (!dev)
return;
arcnum++;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)