Skip to content
Snippets Groups Projects
Commit f86dc74c authored by Gabor Juhos's avatar Gabor Juhos Committed by Oussama Ghorbel
Browse files

generic: add detach callback to struct phy_driver


lede-commit: fe61fc2d7d0b3fb348b502f68f98243b3ddf5867

Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
parent cf7f0b8d
No related branches found
No related tags found
No related merge requests found
......@@ -1001,6 +1001,9 @@ void phy_detach(struct phy_device *phydev)
struct mii_bus *bus;
int i;
if (phydev->drv && phydev->drv->detach)
phydev->drv->detach(phydev);
phydev->attached_dev->phydev = NULL;
phydev->attached_dev = NULL;
phy_suspend(phydev);
......
......@@ -507,6 +507,12 @@ struct phy_driver {
*/
int (*did_interrupt)(struct phy_device *phydev);
/*
* Called before an ethernet device is detached
* from the PHY.
*/
void (*detach)(struct phy_device *phydev);
/* Clears up any memory if needed */
void (*remove)(struct phy_device *phydev);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment