mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
net: phy: smsc: use device_property_present in smsc_phy_probe
Use unified device property API. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/a969f012-1d3b-7a36-51cf-89a5f8f15a9b@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
ad4bf5f240
commit
90c7dd3265
1 changed files with 1 additions and 2 deletions
|
@ -269,7 +269,6 @@ static void smsc_get_stats(struct phy_device *phydev,
|
|||
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;
|
||||
|
||||
|
@ -279,7 +278,7 @@ static int smsc_phy_probe(struct phy_device *phydev)
|
|||
|
||||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue