static int smsc_phy_probe(struct phy_device *phydev)
{
struct device *dev = &phydev->mdio.dev;
static int smsc_phy_probe(struct phy_device *phydev)
{
struct device *dev = &phydev->mdio.dev;
- struct device_node *of_node = dev->of_node;
struct smsc_phy_priv *priv;
struct clk *refclk;
struct smsc_phy_priv *priv;
struct clk *refclk;
priv->energy_enable = true;
priv->energy_enable = true;
- if (of_property_read_bool(of_node, "smsc,disable-energy-detect"))
+ if (device_property_present(dev, "smsc,disable-energy-detect"))
priv->energy_enable = false;
phydev->priv = priv;
priv->energy_enable = false;
phydev->priv = priv;