Skip to content

Commit 8e2bb95

Browse files
vladimirolteandavem330
authored andcommitted
net: pcs: xpcs: export xpcs_probe
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>
1 parent 14b517c commit 8e2bb95

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎drivers/net/ethernet/stmicro/stmmac/hwif.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,6 @@ struct stmmac_mmc_ops {
620620
stmmac_do_callback(__priv, xpcs, get_state, __args)
621621
#define stmmac_xpcs_link_up(__priv, __args...) \
622622
stmmac_do_callback(__priv, xpcs, link_up, __args)
623-
#define stmmac_xpcs_probe(__priv, __args...) \
624-
stmmac_do_callback(__priv, xpcs, probe, __args)
625623

626624
struct stmmac_regs_off {
627625
u32 ptp_off;

‎drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ int stmmac_mdio_register(struct net_device *ndev)
521521
for (addr = 0; addr < max_addr; addr++) {
522522
xpcs->addr = addr;
523523

524-
ret = stmmac_xpcs_probe(priv, xpcs, mode);
524+
ret = xpcs_probe(xpcs, mode);
525525
if (!ret) {
526526
found = 1;
527527
break;

‎drivers/net/pcs/pcs-xpcs.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ static const struct xpcs_id xpcs_id_list[] = {
10051005
},
10061006
};
10071007

1008-
static int xpcs_probe(struct mdio_xpcs_args *xpcs, phy_interface_t interface)
1008+
int xpcs_probe(struct mdio_xpcs_args *xpcs, phy_interface_t interface)
10091009
{
10101010
u32 xpcs_id = xpcs_get_id(xpcs);
10111011
int i;
@@ -1028,12 +1028,12 @@ static int xpcs_probe(struct mdio_xpcs_args *xpcs, phy_interface_t interface)
10281028

10291029
return -ENODEV;
10301030
}
1031+
EXPORT_SYMBOL_GPL(xpcs_probe);
10311032

10321033
static struct mdio_xpcs_ops xpcs_ops = {
10331034
.config = xpcs_config,
10341035
.get_state = xpcs_get_state,
10351036
.link_up = xpcs_link_up,
1036-
.probe = xpcs_probe,
10371037
};
10381038

10391039
struct mdio_xpcs_ops *mdio_xpcs_get_ops(void)

‎include/linux/pcs/pcs-xpcs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ struct mdio_xpcs_ops {
2929
struct phylink_link_state *state);
3030
int (*link_up)(struct mdio_xpcs_args *xpcs, int speed,
3131
phy_interface_t interface);
32-
int (*probe)(struct mdio_xpcs_args *xpcs, phy_interface_t interface);
3332
};
3433

3534
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,
3837
struct phylink_link_state *state);
3938
int xpcs_config_eee(struct mdio_xpcs_args *xpcs, int mult_fact_100ns,
4039
int enable);
40+
int xpcs_probe(struct mdio_xpcs_args *xpcs, phy_interface_t interface);
4141

4242
#endif /* __LINUX_PCS_XPCS_H */

0 commit comments

Comments
 (0)