/* This is a wrapper around register_netdevice that takes the rtnl semaphore and expands the device name if you passed a format string to alloc_netdev.  */
int register_netdev(struct net_device *dev)
/* This is a wrapper around register_netdevice that takes the rtnl semaphore and expands the device name if you passed a format string to alloc_netdev.  */
int register_netdev(struct net_device *dev)
{
	int err;
	rtnl_lock();
	if (strchr(dev->name, '%')) {
		err = dev_alloc_name(dev, dev->name);
		if (err < 0)
			goto out;
	}
	err = register_netdevice(dev);
out:
	rtnl_unlock();
	return err;
}