Skip to content

Commit d408ec0

Browse files
andy-shevdavem330
authored andcommitted
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>
1 parent dc0b98a commit d408ec0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/net/mdio/fwnode_mdio.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus,
115115
struct mii_timestamper *mii_ts = NULL;
116116
struct pse_control *psec = NULL;
117117
struct phy_device *phy;
118-
bool is_c45 = false;
118+
bool is_c45;
119119
u32 phy_id;
120120
int rc;
121121

@@ -129,11 +129,7 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus,
129129
goto clean_pse;
130130
}
131131

132-
rc = fwnode_property_match_string(child, "compatible",
133-
"ethernet-phy-ieee802.3-c45");
134-
if (rc >= 0)
135-
is_c45 = true;
136-
132+
is_c45 = fwnode_device_is_compatible(child, "ethernet-phy-ieee802.3-c45");
137133
if (is_c45 || fwnode_get_phy_id(child, &phy_id))
138134
phy = get_phy_device(bus, addr, is_c45);
139135
else

0 commit comments

Comments
 (0)