diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-01-19 18:50:10 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-01-23 15:37:13 +0100 |
commit | d408ec0b5d9acc2d2f276946adf167095eb59740 (patch) | |
tree | 791357e790cbfaff6fe0b150aeae31caaf2b3d2e /drivers/net/mdio | |
parent | ethtool: Add and use ethnl_update_bool. (diff) | |
download | linux-d408ec0b5d9acc2d2f276946adf167095eb59740.tar.xz linux-d408ec0b5d9acc2d2f276946adf167095eb59740.zip |
net: mdiobus: Convert to use fwnode_device_is_compatible()
Replace open coded fwnode_device_is_compatible() in the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mdio')
-rw-r--r-- | drivers/net/mdio/fwnode_mdio.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/mdio/fwnode_mdio.c b/drivers/net/mdio/fwnode_mdio.c index b782c35c4ac1..1183ef5e203e 100644 --- a/drivers/net/mdio/fwnode_mdio.c +++ b/drivers/net/mdio/fwnode_mdio.c @@ -115,7 +115,7 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus, struct mii_timestamper *mii_ts = NULL; struct pse_control *psec = NULL; struct phy_device *phy; - bool is_c45 = false; + bool is_c45; u32 phy_id; int rc; @@ -129,11 +129,7 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus, goto clean_pse; } - rc = fwnode_property_match_string(child, "compatible", - "ethernet-phy-ieee802.3-c45"); - if (rc >= 0) - is_c45 = true; - + is_c45 = fwnode_device_is_compatible(child, "ethernet-phy-ieee802.3-c45"); if (is_c45 || fwnode_get_phy_id(child, &phy_id)) phy = get_phy_device(bus, addr, is_c45); else |