mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
net: stmmac: disable PTP clock after unregistering PTP
Follow the principle of unpublish from userspace and then teardown resources. Disable the PTP clock only after unregistering with the PTP subsystem, which ensures that we only stop the clock that ticks the timesource after we have removed the PTP device. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
9a1d6fa001
commit
99a8789afd
@@ -817,8 +817,8 @@ static int stmmac_init_ptp(struct stmmac_priv *priv)
|
||||
|
||||
static void stmmac_release_ptp(struct stmmac_priv *priv)
|
||||
{
|
||||
clk_disable_unprepare(priv->plat->clk_ptp_ref);
|
||||
stmmac_ptp_unregister(priv);
|
||||
clk_disable_unprepare(priv->plat->clk_ptp_ref);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user