Commit d408ec0b authored by Andy Shevchenko's avatar Andy Shevchenko Committed by David S. Miller

net: mdiobus: Convert to use fwnode_device_is_compatible()

Replace open coded fwnode_device_is_compatible() in the driver.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dc0b98a1
...@@ -115,7 +115,7 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus, ...@@ -115,7 +115,7 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus,
struct mii_timestamper *mii_ts = NULL; struct mii_timestamper *mii_ts = NULL;
struct pse_control *psec = NULL; struct pse_control *psec = NULL;
struct phy_device *phy; struct phy_device *phy;
bool is_c45 = false; bool is_c45;
u32 phy_id; u32 phy_id;
int rc; int rc;
...@@ -129,11 +129,7 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus, ...@@ -129,11 +129,7 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus,
goto clean_pse; goto clean_pse;
} }
rc = fwnode_property_match_string(child, "compatible", is_c45 = fwnode_device_is_compatible(child, "ethernet-phy-ieee802.3-c45");
"ethernet-phy-ieee802.3-c45");
if (rc >= 0)
is_c45 = true;
if (is_c45 || fwnode_get_phy_id(child, &phy_id)) if (is_c45 || fwnode_get_phy_id(child, &phy_id))
phy = get_phy_device(bus, addr, is_c45); phy = get_phy_device(bus, addr, is_c45);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment