/* Description: Take care of setting up the phy_device structure, set the state to READY (the driver's init function should set it to STARTING if needed).  */
static int phy_probe(struct device *dev)
/* Description: Take care of setting up the phy_device structure, set the state to READY (the driver's init function should set it to STARTING if needed).  */
static int phy_probe(struct device *dev)
{
	struct phy_device *phydev;
	struct phy_driver *phydrv;
	struct device_driver *drv;
	int err = 0;
	phydev = to_phy_device(dev);
	drv = get_driver(phydev->dev.driver);
	phydrv = to_phy_driver(drv);
	phydev->drv = phydrv;
	if (!(phydrv->flags & PHY_HAS_INTERRUPT))
		phydev->irq = PHY_POLL;
	mutex_lock(&phydev->lock);
	phydev->supported = phydrv->features;
	phydev->advertising = phydrv->features;
	phydev->state = PHY_READY;
	if (phydev->drv->probe)
		err = phydev->drv->probe(phydev);
	mutex_unlock(&phydev->lock);
	return err;
}