net: pcs: xpcs: export xpcs_probe
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 2 Jun 2021 16:20:16 +0000 (19:20 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Jun 2021 20:30:43 +0000 (13:30 -0700)
Similar to the other recently functions, it is not necessary for
xpcs_probe to be a function pointer, so export it so that it can be
called directly.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/hwif.h
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
drivers/net/pcs/pcs-xpcs.c
include/linux/pcs/pcs-xpcs.h

index c10d11dbde61762e1427e9c864b840b63c64cb97..3dc291ff9f325e1fbdf611a0af8cfcc07e1d61e2 100644 (file)
@@ -620,8 +620,6 @@ struct stmmac_mmc_ops {
        stmmac_do_callback(__priv, xpcs, get_state, __args)
 #define stmmac_xpcs_link_up(__priv, __args...) \
        stmmac_do_callback(__priv, xpcs, link_up, __args)
-#define stmmac_xpcs_probe(__priv, __args...) \
-       stmmac_do_callback(__priv, xpcs, probe, __args)
 
 struct stmmac_regs_off {
        u32 ptp_off;
index e293bf1ce9f3742e7cb7b336b76ad1ee436dbd03..56deb92a8430d6ad738f348f1579ab98efd5ae0a 100644 (file)
@@ -521,7 +521,7 @@ int stmmac_mdio_register(struct net_device *ndev)
                for (addr = 0; addr < max_addr; addr++) {
                        xpcs->addr = addr;
 
-                       ret = stmmac_xpcs_probe(priv, xpcs, mode);
+                       ret = xpcs_probe(xpcs, mode);
                        if (!ret) {
                                found = 1;
                                break;
index 2f2ffab855aa0d3a8b9a34bb1db9d0321d193ac3..7f51eb4bbaa4ebc3c0f9cdf1a3b7f45ebc283640 100644 (file)
@@ -1005,7 +1005,7 @@ static const struct xpcs_id xpcs_id_list[] = {
        },
 };
 
-static int xpcs_probe(struct mdio_xpcs_args *xpcs, phy_interface_t interface)
+int xpcs_probe(struct mdio_xpcs_args *xpcs, phy_interface_t interface)
 {
        u32 xpcs_id = xpcs_get_id(xpcs);
        int i;
@@ -1028,12 +1028,12 @@ static int xpcs_probe(struct mdio_xpcs_args *xpcs, phy_interface_t interface)
 
        return -ENODEV;
 }
+EXPORT_SYMBOL_GPL(xpcs_probe);
 
 static struct mdio_xpcs_ops xpcs_ops = {
        .config = xpcs_config,
        .get_state = xpcs_get_state,
        .link_up = xpcs_link_up,
-       .probe = xpcs_probe,
 };
 
 struct mdio_xpcs_ops *mdio_xpcs_get_ops(void)
index ae74a336dcb97bf459b69d62dc5150de4ce7c611..1d8581b74d81f988381b2598613e78ae54cd2a98 100644 (file)
@@ -29,7 +29,6 @@ struct mdio_xpcs_ops {
                         struct phylink_link_state *state);
        int (*link_up)(struct mdio_xpcs_args *xpcs, int speed,
                       phy_interface_t interface);
-       int (*probe)(struct mdio_xpcs_args *xpcs, phy_interface_t interface);
 };
 
 int xpcs_get_an_mode(struct mdio_xpcs_args *xpcs, phy_interface_t interface);
@@ -38,5 +37,6 @@ void xpcs_validate(struct mdio_xpcs_args *xpcs, unsigned long *supported,
                   struct phylink_link_state *state);
 int xpcs_config_eee(struct mdio_xpcs_args *xpcs, int mult_fact_100ns,
                    int enable);
+int xpcs_probe(struct mdio_xpcs_args *xpcs, phy_interface_t interface);
 
 #endif /* __LINUX_PCS_XPCS_H */