Skip to content

Commit 7d6890e

Browse files
committed
net: mdiobus: Convert to use fwnode_device_is_compatible()
JIRA: https://issues.redhat.com/browse/RHEL-78049 commit d408ec0 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Thu Jan 19 19:50:10 2023 +0200 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> Signed-off-by: Jared Kangas <jkangas@redhat.com>
1 parent a61c502 commit 7d6890e

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
@@ -111,7 +111,7 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus,
111111
struct mii_timestamper *mii_ts = NULL;
112112
struct pse_control *psec = NULL;
113113
struct phy_device *phy;
114-
bool is_c45 = false;
114+
bool is_c45;
115115
u32 phy_id;
116116
int rc;
117117

@@ -125,11 +125,7 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus,
125125
goto clean_pse;
126126
}
127127

128-
rc = fwnode_property_match_string(child, "compatible",
129-
"ethernet-phy-ieee802.3-c45");
130-
if (rc >= 0)
131-
is_c45 = true;
132-
128+
is_c45 = fwnode_device_is_compatible(child, "ethernet-phy-ieee802.3-c45");
133129
if (is_c45 || fwnode_get_phy_id(child, &phy_id))
134130
phy = get_phy_device(bus, addr, is_c45);
135131
else

0 commit comments

Comments
 (0)