Commit 085d4871 authored by Alexander Viro's avatar Alexander Viro Committed by Stephen Hemminger

[netdrvr] alloc_etherdev-related cleanups

Mostly removing unneeded calls to ether_setup(), which alloc_etherdev()
already does for us.
parent d7bc9df7
......@@ -72,8 +72,7 @@ static int __init ethertap_probe(int unit)
struct net_device *dev;
int err = -ENOMEM;
dev = alloc_netdev(sizeof(struct net_local), "tap%d",
ether_setup);
dev = alloc_etherdev(sizeof(struct net_local));
if (!dev)
goto out;
......
......@@ -1282,13 +1282,13 @@ static void plip_attach (struct parport *port)
}
sprintf(name, "plip%d", unit);
dev = alloc_netdev(sizeof(struct net_local), name,
ether_setup);
dev = alloc_etherdev(sizeof(struct net_local));
if (!dev) {
printk(KERN_ERR "plip: memory squeeze\n");
return;
}
strcpy(dev->name, name);
dev->init = plip_init_netdev;
SET_MODULE_OWNER(dev);
......
......@@ -1782,9 +1782,7 @@ eth_bind (struct usb_gadget *gadget)
/* network device setup */
dev->net = net;
SET_MODULE_OWNER (net);
net->priv = dev;
strcpy (net->name, "usb%d");
ether_setup (net);
/* one random address for the gadget device ... both of these could
* reasonably come from an id prom or a module parameter.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment