Skip to content

Commit

Permalink
net: phy: remove gen10g_no_soft_reset
Browse files Browse the repository at this point in the history
genphy_no_soft_reset and gen10g_no_soft_reset are both the same no-ops,
one is enough.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Mar 4, 2019
1 parent d81210c commit 7be3ad8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion drivers/net/phy/cortina.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static struct phy_driver cortina_driver[] = {
.features = PHY_10GBIT_FEATURES,
.config_aneg = gen10g_config_aneg,
.read_status = cortina_read_status,
.soft_reset = gen10g_no_soft_reset,
.soft_reset = genphy_no_soft_reset,
.probe = cortina_probe,
},
};
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/phy/marvell10g.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ static struct phy_driver mv3310_drivers[] = {
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "mv88x3310",
.get_features = mv3310_get_features,
.soft_reset = gen10g_no_soft_reset,
.soft_reset = genphy_no_soft_reset,
.config_init = mv3310_config_init,
.probe = mv3310_probe,
.suspend = mv3310_suspend,
Expand All @@ -474,7 +474,7 @@ static struct phy_driver mv3310_drivers[] = {
.name = "mv88x2110",
.get_features = genphy_c45_pma_read_abilities,
.probe = mv3310_probe,
.soft_reset = gen10g_no_soft_reset,
.soft_reset = genphy_no_soft_reset,
.config_init = mv3310_config_init,
.config_aneg = mv3310_config_aneg,
.aneg_done = mv3310_aneg_done,
Expand Down
9 changes: 1 addition & 8 deletions drivers/net/phy/phy-c45.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,18 +508,11 @@ static int gen10g_read_status(struct phy_device *phydev)
return genphy_c45_read_link(phydev);
}

int gen10g_no_soft_reset(struct phy_device *phydev)
{
/* Do nothing for now */
return 0;
}
EXPORT_SYMBOL_GPL(gen10g_no_soft_reset);

struct phy_driver genphy_10g_driver = {
.phy_id = 0xffffffff,
.phy_id_mask = 0xffffffff,
.name = "Generic 10G PHY",
.soft_reset = gen10g_no_soft_reset,
.soft_reset = genphy_no_soft_reset,
.features = PHY_10GBIT_FEATURES,
.config_aneg = gen10g_config_aneg,
.read_status = gen10g_read_status,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/phy/teranetics.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static struct phy_driver teranetics_driver[] = {
.phy_id_mask = 0xffffffff,
.name = "Teranetics TN2020",
.features = PHY_10GBIT_FEATURES,
.soft_reset = gen10g_no_soft_reset,
.soft_reset = genphy_no_soft_reset,
.aneg_done = teranetics_aneg_done,
.config_aneg = gen10g_config_aneg,
.read_status = teranetics_read_status,
Expand Down
1 change: 0 additions & 1 deletion include/linux/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,6 @@ int genphy_c45_read_status(struct phy_device *phydev);

/* The gen10g_* functions are the old Clause 45 stub */
int gen10g_config_aneg(struct phy_device *phydev);
int gen10g_no_soft_reset(struct phy_device *phydev);

static inline int phy_read_status(struct phy_device *phydev)
{
Expand Down

0 comments on commit 7be3ad8

Please sign in to comment.