summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/mt7530.c
diff options
context:
space:
mode:
authorArınç ÜNAL <arinc.unal@arinc9.com>2024-03-01 12:43:02 +0200
committerPaolo Abeni <pabeni@redhat.com>2024-03-05 12:23:43 +0100
commit1192ed898c970a1e6bd5f0e0d92c60214228e62a (patch)
treeac970967a99a66b0aee8faaa1728231ed43b78fa /drivers/net/dsa/mt7530.c
parent22fa10170af5963e921b73159348bef807f58e50 (diff)
net: dsa: mt7530: get rid of mt753x_mac_config()
There is no need for a separate function to call priv->info->mac_port_config(). Call it from mt753x_phylink_mac_config() instead and remove mt753x_mac_config(). Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/dsa/mt7530.c')
-rw-r--r--drivers/net/dsa/mt7530.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 80b65f064310..e353c03dd1db 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2634,16 +2634,6 @@ mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
}
}
-static void
-mt753x_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
- const struct phylink_link_state *state)
-{
- struct mt7530_priv *priv = ds->priv;
-
- if (priv->info->mac_port_config)
- priv->info->mac_port_config(ds, port, mode, state->interface);
-}
-
static struct phylink_pcs *
mt753x_phylink_mac_select_pcs(struct dsa_switch *ds, int port,
phy_interface_t interface)
@@ -2669,8 +2659,8 @@ mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
struct mt7530_priv *priv = ds->priv;
u32 mcr_cur, mcr_new;
- if (port == 5 || port == 6)
- mt753x_mac_config(ds, port, mode, state);
+ if ((port == 5 || port == 6) && priv->info->mac_port_config)
+ priv->info->mac_port_config(ds, port, mode, state->interface);
mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
mcr_new = mcr_cur;