[PATCH v4 03/13] net: phy: export of_phy_register_fixed_link() function

Oleksij Rempel o.rempel at pengutronix.de
Fri Apr 8 01:29:40 PDT 2022


We will need this function by DSA framework

Signed-off-by: Oleksij Rempel <o.rempel at pengutronix.de>
---
 drivers/net/phy/phy.c | 4 ++--
 include/linux/phy.h   | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index e8e8dad5bd..4c09839f3f 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -302,8 +302,8 @@ void phy_unregister_device(struct phy_device *phydev)
 	phydev->registered = 0;
 }
 
-static struct phy_device *of_phy_register_fixed_link(struct device_node *np,
-						struct eth_device *edev)
+struct phy_device *of_phy_register_fixed_link(struct device_node *np,
+		                              struct eth_device *edev)
 {
 	struct phy_device *phydev;
 
diff --git a/include/linux/phy.h b/include/linux/phy.h
index d9fb514277..2711e7dad3 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -280,6 +280,8 @@ int phy_drivers_register(struct phy_driver *new_driver, int n);
 struct phy_device *get_phy_device(struct mii_bus *bus, int addr);
 int phy_init(void);
 int phy_init_hw(struct phy_device *phydev);
+struct phy_device *of_phy_register_fixed_link(struct device_node *np,
+		                              struct eth_device *edev);
 
 #define phy_register_drivers_macro(level, drvs)				\
         static int __init drvs##_register(void)				\
-- 
2.30.2




More information about the barebox mailing list