]> git.sur5r.net Git - u-boot/blobdiff - drivers/phy/phy-uclass.c
Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTR
[u-boot] / drivers / phy / phy-uclass.c
index d8b8d58e44f30d8f1cbc4423f7542f343a5c6ff2..bdca4c0238ac037764e4228361a97b23ac1317f4 100644 (file)
@@ -9,8 +9,6 @@
 #include <dm.h>
 #include <generic-phy.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static inline struct phy_ops *phy_dev_ops(struct udevice *dev)
 {
        return (struct phy_ops *)dev->driver->ops;
@@ -45,6 +43,7 @@ int generic_phy_get_by_index(struct udevice *dev, int index,
        debug("%s(dev=%p, index=%d, phy=%p)\n", __func__, dev, index, phy);
 
        assert(phy);
+       phy->dev = NULL;
        ret = dev_read_phandle_with_args(dev, "phys", "#phy-cells", 0, index,
                                         &args);
        if (ret) {