]> git.baikalelectronics.ru Git - kernel.git/commit
net: mii_timestamper: fix static allocation by PHY driver
authorMichael Walle <michael@walle.cc>
Thu, 30 Jan 2020 17:44:51 +0000 (18:44 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 31 Jan 2020 15:46:11 +0000 (07:46 -0800)
commit9c7dbb7d6df621f121879df46eee47e975c7ad8c
tree25853cebe19b720cfca998dcf2cd5d5a09270e16
parent87b997a50830757b8732181448e81f6b6d4cf3f6
net: mii_timestamper: fix static allocation by PHY driver

If phydev->mii_ts is set by the PHY driver, it will always be
overwritten in of_mdiobus_register_phy(). Fix it. Also make sure, that
the unregister() doesn't do anything if the mii_timestamper was provided by
the PHY driver.

Fixes: a3885102787c ("net: mdio: of: Register discovered MII time stampers.")
Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/mii_timestamper.c
drivers/of/of_mdio.c