]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: phy: Remove static return type for phy_device_create()
authorMichal Simek <michal.simek@xilinx.com>
Wed, 23 Feb 2022 14:45:41 +0000 (15:45 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 9 Mar 2022 11:43:16 +0000 (12:43 +0100)
Remove static return type for phy_device_create() to avoid file scope for
this function. Also add required prototype in phy.h.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Link: https://lore.kernel.org/r/1517f4053403fbd53e899d500e7485d068a4f0b6.1645627539.git.michal.simek@xilinx.com
drivers/net/phy/phy.c
include/phy.h

index c9fc20855ba1189e1b9835b367b69c367b979808..f63705e1b9a1207e5161990549d02fa7e0500014 100644 (file)
@@ -659,9 +659,9 @@ static struct phy_driver *get_phy_driver(struct phy_device *phydev,
        return generic_for_interface(interface);
 }
 
-static struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
-                                           u32 phy_id, bool is_c45,
-                                           phy_interface_t interface)
+struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
+                                    u32 phy_id, bool is_c45,
+                                    phy_interface_t interface)
 {
        struct phy_device *dev;
 
index c66fd43ea887d5b4ab6a20ac624b7df6f2afdb78..832d7a1695785b1656150983849570b51182075d 100644 (file)
@@ -454,6 +454,19 @@ void phy_connect_dev(struct phy_device *phydev, struct udevice *dev);
 struct phy_device *phy_connect(struct mii_dev *bus, int addr,
                                struct udevice *dev,
                                phy_interface_t interface);
+/**
+ * phy_device_create() - Create a PHY device
+ *
+ * @bus:               MII/MDIO bus that hosts the PHY
+ * @addr:              PHY address on MDIO bus
+ * @phy_id:            where to store the ID retrieved
+ * @is_c45:            Device Identifiers if is_c45
+ * @interface:         interface between the MAC and PHY
+ * @return: pointer to phy_device if a PHY is found, or NULL otherwise
+ */
+struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
+                                    u32 phy_id, bool is_c45,
+                                    phy_interface_t interface);
 
 static inline ofnode phy_get_ofnode(struct phy_device *phydev)
 {