summaryrefslogtreecommitdiff
path: root/drivers/of/of_mdio.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-03 18:11:07 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-03 18:11:07 +0300
commitc5c0283a9db1c7ba5881f956a1faf2ebc3dfe70e (patch)
treea4d44768f1591f40374c87eea9a28df8faccc103 /drivers/of/of_mdio.c
parenta31f01777bc54a0a9d57628956d05f8d454d3418 (diff)
parent36f3313d6bff91ab2a9e47698c27d15363640a4e (diff)
downloadlinux-c5c0283a9db1c7ba5881f956a1faf2ebc3dfe70e.tar.xz
Merge generic_lookup_helpers into usb-next
The lookup helpers are needed here. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/of/of_mdio.c')
-rw-r--r--drivers/of/of_mdio.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 44f53496cab1..000b95787df1 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -280,12 +280,6 @@ unregister:
}
EXPORT_SYMBOL(of_mdiobus_register);
-/* Helper function for of_phy_find_device */
-static int of_phy_match(struct device *dev, const void *phy_np)
-{
- return dev->of_node == phy_np;
-}
-
/**
* of_phy_find_device - Give a PHY node, find the phy_device
* @phy_np: Pointer to the phy's device tree node
@@ -301,7 +295,7 @@ struct phy_device *of_phy_find_device(struct device_node *phy_np)
if (!phy_np)
return NULL;
- d = bus_find_device(&mdio_bus_type, NULL, phy_np, of_phy_match);
+ d = bus_find_device_by_of_node(&mdio_bus_type, phy_np);
if (d) {
mdiodev = to_mdio_device(d);
if (mdiodev->flags & MDIO_DEVICE_FLAG_PHY)