patch-2.3.99-pre7 linux/drivers/net/hamradio/dmascc.c

Next file: linux/drivers/net/hamradio/hdlcdrv.c
Previous file: linux/drivers/net/hamradio/bpqether.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre6/linux/drivers/net/hamradio/dmascc.c linux/drivers/net/hamradio/dmascc.c
@@ -211,7 +211,6 @@
 };
 
 struct scc_priv {
-  char name[10];
   struct enet_statistics stats;
   struct scc_info *info;
   int channel;
@@ -553,7 +552,6 @@
   for (i = 0; i < 2; i++) {
     dev = &info->dev[i];
     priv = &info->priv[i];
-    sprintf(priv->name, "dmascc%i", 2*n+i);
     priv->info = info;
     priv->channel = i;
     priv->cmd = info->scc_base + (i ? SCCB_CMD : SCCA_CMD);
@@ -571,7 +569,7 @@
     priv->rx_task.routine = rx_bh;
     priv->rx_task.data = dev;
     dev->priv = priv;
-    dev->name = priv->name;
+    sprintf(dev->name, "dmascc%i", 2*n+i);
     dev->base_addr = io;
     dev->irq = irq;
     dev->open = scc_open;
@@ -593,7 +591,6 @@
     dev_init_buffers(dev);
     if (register_netdevice(dev)) {
       printk("dmascc: could not register %s\n", dev->name);
-      dev->name = NULL;
     }
   }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)