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>
This commit is contained in:
Richard Cochran
2019-12-25 18:16:18 -08:00
committed by David S. Miller
parent 25d12e1dde
commit 1dca22b184
2 changed files with 32 additions and 1 deletions

View File

@@ -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 */