1 From 0c282205ef8c6dd6d2c145fac1fb6aba3e65c02d Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
3 Date: Fri, 1 Mar 2024 12:43:02 +0200
4 Subject: [PATCH 42/48] net: dsa: mt7530: get rid of mt753x_mac_config()
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 There is no need for a separate function to call
10 priv->info->mac_port_config(). Call it from mt753x_phylink_mac_config()
11 instead and remove mt753x_mac_config().
13 Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
14 Signed-off-by: Paolo Abeni <pabeni@redhat.com>
16 drivers/net/dsa/mt7530.c | 14 ++------------
17 1 file changed, 2 insertions(+), 12 deletions(-)
19 --- a/drivers/net/dsa/mt7530.c
20 +++ b/drivers/net/dsa/mt7530.c
21 @@ -2661,16 +2661,6 @@ mt7531_mac_config(struct dsa_switch *ds,
26 -mt753x_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
27 - const struct phylink_link_state *state)
29 - struct mt7530_priv *priv = ds->priv;
31 - if (priv->info->mac_port_config)
32 - priv->info->mac_port_config(ds, port, mode, state->interface);
35 static struct phylink_pcs *
36 mt753x_phylink_mac_select_pcs(struct dsa_switch *ds, int port,
37 phy_interface_t interface)
38 @@ -2696,8 +2686,8 @@ mt753x_phylink_mac_config(struct dsa_swi
39 struct mt7530_priv *priv = ds->priv;
42 - if (port == 5 || port == 6)
43 - mt753x_mac_config(ds, port, mode, state);
44 + if ((port == 5 || port == 6) && priv->info->mac_port_config)
45 + priv->info->mac_port_config(ds, port, mode, state->interface);
47 mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));