diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-11-20 23:43:21 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-12-14 14:30:19 +0100 |
commit | 2319503ed22a6daea00de1c6f0965fcc4e649dd2 (patch) | |
tree | 386b78b23ee39ab57e1f07b22cbc88c4e38f2d0e /net/eth.c | |
parent | 4362c73ac768ad7218982fc1ccf8ae04285c27d1 (diff) | |
download | barebox-2319503ed22a6daea00de1c6f0965fcc4e649dd2.tar.gz barebox-2319503ed22a6daea00de1c6f0965fcc4e649dd2.tar.xz |
net: remove "current" network device
Now that we can do routing we no longer need a "current"
network device. Remove it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net/eth.c')
-rw-r--r-- | net/eth.c | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -28,7 +28,6 @@ #include <errno.h> #include <malloc.h> -static struct eth_device *eth_current; static uint64_t last_link_check; LIST_HEAD(netdev_list); @@ -149,16 +148,6 @@ void of_eth_register_ethaddr(struct device_node *node, const char *ethaddr) list_add_tail(&addr->list, ðaddr_list); } -void eth_set_current(struct eth_device *eth) -{ - eth_current = eth; -} - -struct eth_device * eth_get_current(void) -{ - return eth_current; -} - struct eth_device *eth_get_byname(const char *ethname) { struct eth_device *edev; @@ -412,17 +401,11 @@ int eth_register(struct eth_device *edev) edev->parent->device_node) edev->nodepath = xstrdup(edev->parent->device_node->full_name); - if (!eth_current) - eth_current = edev; - return 0; } void eth_unregister(struct eth_device *edev) { - if (edev == eth_current) - eth_current = NULL; - if (edev->active) edev->halt(edev); |