summaryrefslogtreecommitdiff
path: root/arch/xtensa
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2013-11-10 16:05:46 +0400
committerChris Zankel <chris@zankel.net>2014-01-14 10:19:49 -0800
commit358b181003dbb30985331a77e753e1b05c05d87d (patch)
tree5fb9a3e49561b4ed3f7b1f3f948ff522bcf0ce08 /arch/xtensa
parent8c8ad85f1f3ee1c2096a6b7b0892cabe4a956e31 (diff)
xtensa: ISS: init network interface name before the probe
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/platforms/iss/network.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c
index 0c7c1d4141db..3718cff3909a 100644
--- a/arch/xtensa/platforms/iss/network.c
+++ b/arch/xtensa/platforms/iss/network.c
@@ -545,6 +545,13 @@ static int iss_net_configure(int index, char *init)
};
/*
+ * If this name ends up conflicting with an existing registered
+ * netdevice, that is OK, register_netdev{,ice}() will notice this
+ * and fail.
+ */
+ snprintf(dev->name, sizeof(dev->name), "eth%d", index);
+
+ /*
* Try all transport protocols.
* Note: more protocols can be added by adding '&& !X_init(lp, eth)'.
*/
@@ -575,13 +582,6 @@ static int iss_net_configure(int index, char *init)
platform_device_register(&lp->pdev);
SET_NETDEV_DEV(dev, &lp->pdev.dev);
- /*
- * If this name ends up conflicting with an existing registered
- * netdevice, that is OK, register_netdev{,ice}() will notice this
- * and fail.
- */
- snprintf(dev->name, sizeof(dev->name), "eth%d", index);
-
dev->netdev_ops = &iss_netdev_ops;
dev->mtu = lp->mtu;
dev->watchdog_timeo = (HZ >> 1);