summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-16 21:20:16 -0700
committerSimon Glass <sjg@chromium.org>2020-12-18 20:32:21 -0700
commit552da3357b5139b9b0e4d2c2917820e996ae865e (patch)
treedf6aebfd6f05a5f2579624b03a394031ae302ab5 /net
parent16df99324663fd3f88cb5e1ce241ee3f9f9ddacd (diff)
downloadu-boot-552da3357b5139b9b0e4d2c2917820e996ae865e.tar.gz
net: Update to use new sequence numbers
Checking for seq == -1 is effectively checking that the device is activated. The new sequence numbers are never -1 for a bound device, so update the check. Also drop the note about valid sequence numbers so it is accurate with the new approach. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net')
-rw-r--r--net/eth-uclass.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index fad9770e74..4eee0113eb 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -126,9 +126,6 @@ struct udevice *eth_get_dev_by_name(const char *devname)
uclass_foreach_dev(it, uc) {
/*
- * We need the seq to be valid, so try to probe it.
- * If the probe fails, the seq will not match since it will be
- * -1 instead of what we are looking for.
* We don't care about errors from probe here. Either they won't
* match an alias or it will match a literal name and we'll pick
* up the error when we try to probe again in eth_set_dev().
@@ -434,7 +431,7 @@ int eth_initialize(void)
bootstage_mark(BOOTSTAGE_ID_NET_ETH_INIT);
do {
- if (dev_seq(dev) != -1) {
+ if (device_active(dev)) {
if (num_devices)
printf(", ");
@@ -446,7 +443,7 @@ int eth_initialize(void)
eth_write_hwaddr(dev);
- if (dev_seq(dev) != -1)
+ if (device_active(dev))
num_devices++;
uclass_next_device_check(&dev);
} while (dev);