]> git.sur5r.net Git - u-boot/blobdiff - drivers/phy/phy-uclass.c
Merge branch 'master' of git://git.denx.de/u-boot-usb
[u-boot] / drivers / phy / phy-uclass.c
index d8b8d58e44f30d8f1cbc4423f7542f343a5c6ff2..c4b3e409b3e02461a5e4759faf34a43e971b0d65 100644 (file)
@@ -1,16 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
  * Written by Jean-Jacques Hiblot  <jjhiblot@ti.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #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 +42,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) {