diff options
author | Richard Cochran <richardcochran@gmail.com> | 2019-12-25 18:16:18 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-25 19:51:33 -0800 |
commit | 1dca22b1842136f57e9bd60fefd1715c22ff1874 (patch) | |
tree | 5e8f379e9899a8f1c4fe46414bf8ebff8695faf8 /drivers/net/phy | |
parent | 25d12e1dde28fafd2ac37afadd24252fa19b80cd (diff) |
net: mdio: of: Register discovered MII time stampers.
When parsing a PHY node, register its time stamper, if any, and attach
the instance to the PHY device.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/phy_device.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index e55119cd6c86..e5dc9f87f495 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -881,6 +881,9 @@ EXPORT_SYMBOL(phy_device_register); */ void phy_device_remove(struct phy_device *phydev) { + if (phydev->mii_ts) + unregister_mii_timestamper(phydev->mii_ts); + device_del(&phydev->mdio.dev); /* Assert the reset signal */ |