patch-2.3.99-pre7 linux/drivers/net/hamradio/scc.c
Next file: linux/drivers/net/hamradio/soundmodem/sm.c
Previous file: linux/drivers/net/hamradio/mkiss.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Thu May 4 11:31:21 2000
- Orig file:
v2.3.99-pre6/linux/drivers/net/hamradio/scc.c
- Orig date:
Tue Mar 14 19:10:39 2000
diff -u --recursive --new-file v2.3.99-pre6/linux/drivers/net/hamradio/scc.c linux/drivers/net/hamradio/scc.c
@@ -1554,7 +1554,6 @@
static int scc_net_setup(struct scc_channel *scc, unsigned char *name, int addev)
{
- unsigned char *buf;
struct net_device *dev;
if (dev_get(name))
@@ -1569,13 +1568,8 @@
dev = scc->dev;
memset(dev, 0, sizeof(struct net_device));
- if ((buf = (unsigned char *) kmalloc(10, GFP_KERNEL)) == NULL)
- return -ENOMEM;
-
- strcpy(buf, name);
-
+ strcpy(dev->name, name);
dev->priv = (void *) scc;
- dev->name = buf;
dev->init = scc_net_init;
if ((addev? register_netdevice(dev) : register_netdev(dev)) != 0)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)