Mostly removing unneeded calls to ether_setup(), which alloc_etherdev()
already does for us.
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;
}
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);
/* 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.