Skip to content

Commit

Permalink
net: phy: smsc: use device_property_present in smsc_phy_probe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
hkallweit authored and kuba-moo committed Mar 13, 2023
1 parent ad4bf5f commit 90c7dd3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/phy/smsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit 90c7dd3

Please sign in to comment.