mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
net: call dev_alloc_name from register_netdevice
Force dev_alloc_name() to be called from register_netdevice() by
dev_get_valid_name(). That allows to remove multiple explicit
dev_alloc_name() calls.
The possibility to call dev_alloc_name in advance remains.
This also fixes veth creation regresion caused by
84c49d8c3e
Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
e892067497
commit
1c5cae815d
20 changed files with 12 additions and 134 deletions
|
|
@ -393,16 +393,6 @@ static int __devinit ieee802154fake_probe(struct platform_device *pdev)
|
|||
priv = netdev_priv(dev);
|
||||
priv->phy = phy;
|
||||
|
||||
/*
|
||||
* If the name is a format string the caller wants us to do a
|
||||
* name allocation.
|
||||
*/
|
||||
if (strchr(dev->name, '%')) {
|
||||
err = dev_alloc_name(dev, dev->name);
|
||||
if (err < 0)
|
||||
goto out;
|
||||
}
|
||||
|
||||
wpan_phy_set_dev(phy, &pdev->dev);
|
||||
SET_NETDEV_DEV(dev, &phy->dev);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue