Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dsa: mt7530: unexport mt7530_switch_ops

Commit cb675afcddbb ("net: dsa: mt7530: introduce separate MDIO driver")
exported mt7530_switch_ops for use from mt7530-mmio.c. Later in the
patch set, mt7530-mmio.c used mt7530_probe_common() to access the
mt7530_switch_ops still from mt7530.c - see commit 110c18bfed41 ("net:
dsa: mt7530: introduce driver for MT7988 built-in switch").

This proves that exporting mt7530_switch_ops was unnecessary, so
unexport it back.

Cc: DENG Qingfang <dqfext@gmail.com>
Cc: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Daniel Golle <daniel@makrotopia.org>
Acked-by: Daniel Golle <daniel@makrotopia.org>
Acked-by: Chester A. Unal <chester.a.unal@arinc9.com>
Link: https://patch.msgid.link/20251130131657.65080-2-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Vladimir Oltean and committed by
Jakub Kicinski
3b87e60d b4dcaeea

+1 -3
+1 -2
drivers/net/dsa/mt7530.c
··· 3254 3254 return mt7531_setup_common(ds); 3255 3255 } 3256 3256 3257 - const struct dsa_switch_ops mt7530_switch_ops = { 3257 + static const struct dsa_switch_ops mt7530_switch_ops = { 3258 3258 .get_tag_protocol = mtk_get_tag_protocol, 3259 3259 .setup = mt753x_setup, 3260 3260 .preferred_default_local_cpu_port = mt753x_preferred_default_local_cpu_port, ··· 3291 3291 .conduit_state_change = mt753x_conduit_state_change, 3292 3292 .port_setup_tc = mt753x_setup_tc, 3293 3293 }; 3294 - EXPORT_SYMBOL_GPL(mt7530_switch_ops); 3295 3294 3296 3295 static const struct phylink_mac_ops mt753x_phylink_mac_ops = { 3297 3296 .mac_select_pcs = mt753x_phylink_mac_select_pcs,
-1
drivers/net/dsa/mt7530.h
··· 939 939 int mt7530_probe_common(struct mt7530_priv *priv); 940 940 void mt7530_remove_common(struct mt7530_priv *priv); 941 941 942 - extern const struct dsa_switch_ops mt7530_switch_ops; 943 942 extern const struct mt753x_info mt753x_table[]; 944 943 945 944 #endif /* __MT7530_H */