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) ...@@ -72,8 +72,7 @@ static int __init ethertap_probe(int unit)
struct net_device *dev; struct net_device *dev;
int err = -ENOMEM; int err = -ENOMEM;
dev = alloc_netdev(sizeof(struct net_local), "tap%d", dev = alloc_etherdev(sizeof(struct net_local));
ether_setup);
if (!dev) if (!dev)
goto out; goto out;
......
...@@ -1282,13 +1282,13 @@ static void plip_attach (struct parport *port) ...@@ -1282,13 +1282,13 @@ static void plip_attach (struct parport *port)
} }
sprintf(name, "plip%d", unit); sprintf(name, "plip%d", unit);
dev = alloc_netdev(sizeof(struct net_local), name, dev = alloc_etherdev(sizeof(struct net_local));
ether_setup);
if (!dev) { if (!dev) {
printk(KERN_ERR "plip: memory squeeze\n"); printk(KERN_ERR "plip: memory squeeze\n");
return; return;
} }
strcpy(dev->name, name);
dev->init = plip_init_netdev; dev->init = plip_init_netdev;
SET_MODULE_OWNER(dev); SET_MODULE_OWNER(dev);
......
...@@ -1782,9 +1782,7 @@ eth_bind (struct usb_gadget *gadget) ...@@ -1782,9 +1782,7 @@ eth_bind (struct usb_gadget *gadget)
/* network device setup */ /* network device setup */
dev->net = net; dev->net = net;
SET_MODULE_OWNER (net); SET_MODULE_OWNER (net);
net->priv = dev;
strcpy (net->name, "usb%d"); strcpy (net->name, "usb%d");
ether_setup (net);
/* one random address for the gadget device ... both of these could /* one random address for the gadget device ... both of these could
* reasonably come from an id prom or a module parameter. * 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