]> git.ipfire.org Git - thirdparty/linux.git/commit
net: stmmac: visconti: reorganise visconti_eth_set_clk_tx_rate()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 16 Jun 2025 21:06:22 +0000 (22:06 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 17 Jun 2025 23:25:20 +0000 (16:25 -0700)
commit1923c6c3a8b7fb7d8f35f558f1744667fae51207
tree0fa4e51952d2f8e823f4d5a4a442cbb32f98edca
parent7d7525876b5a7fe8d3229e8e04e78b166e5e8d75
net: stmmac: visconti: reorganise visconti_eth_set_clk_tx_rate()

Rather than testing dwmac->phy_intf_sel several times for the same
values in this function, group the code together. The only part
which was common was stopping the internal clock before programming
the clock setting.

This further improves the readability of this function.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/E1uRH26-004UyM-9G@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c