]> git.sur5r.net Git - u-boot/blobdiff - net/eth-uclass.c
test/py: hush_if_test: Use open() in place of file()
[u-boot] / net / eth-uclass.c
index d30b04ba862a8b90d370b97116a7683c1d752f36..e4b49229e38d02936f668ed18b2fa53bceee3191 100644 (file)
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2001-2015
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  * Joe Hershberger, National Instruments
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -336,7 +335,7 @@ int eth_send(void *packet, int length)
        if (!current)
                return -ENODEV;
 
-       if (!device_active(current))
+       if (!eth_is_active(current))
                return -EINVAL;
 
        ret = eth_get_ops(current)->send(current, packet, length);
@@ -359,7 +358,7 @@ int eth_rx(void)
        if (!current)
                return -ENODEV;
 
-       if (!device_active(current))
+       if (!eth_is_active(current))
                return -EINVAL;
 
        /* Process up to 32 packets at one time */
@@ -396,7 +395,7 @@ int eth_initialize(void)
         * This is accomplished by attempting to probe each device and calling
         * their write_hwaddr() operation.
         */
-       uclass_first_device(UCLASS_ETH, &dev);
+       uclass_first_device_check(UCLASS_ETH, &dev);
        if (!dev) {
                printf("No ethernet found.\n");
                bootstage_error(BOOTSTAGE_ID_NET_ETH_START);
@@ -425,7 +424,7 @@ int eth_initialize(void)
 
                        eth_write_hwaddr(dev);
 
-                       uclass_next_device(&dev);
+                       uclass_next_device_check(&dev);
                        num_devices++;
                } while (dev);