summaryrefslogtreecommitdiff
path: root/drivers/net/mdio
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2021-02-17 23:25:57 +0300
committerDavid S. Miller <davem@davemloft.net>2021-02-18 00:17:49 +0300
commit96313e1db8e5629cc2217616dca78f03e6463008 (patch)
tree7e8e00cc0b80ff746b200f8138e600f7a0d73ca3 /drivers/net/mdio
parent597565556581d59641c0be50acaae87f7391a91b (diff)
downloadlinux-96313e1db8e5629cc2217616dca78f03e6463008.tar.xz
net: mdio: Remove of_phy_attach()
We have no in-tree users, also update the sfp-phylink.rst documentation to indicate that phy_attach_direct() is used instead of of_phy_attach(). Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mdio')
-rw-r--r--drivers/net/mdio/of_mdio.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/drivers/net/mdio/of_mdio.c b/drivers/net/mdio/of_mdio.c
index 4daf94bb56a5..ea9d5855fb52 100644
--- a/drivers/net/mdio/of_mdio.c
+++ b/drivers/net/mdio/of_mdio.c
@@ -462,36 +462,6 @@ struct phy_device *of_phy_get_and_connect(struct net_device *dev,
}
EXPORT_SYMBOL(of_phy_get_and_connect);
-/**
- * of_phy_attach - Attach to a PHY without starting the state machine
- * @dev: pointer to net_device claiming the phy
- * @phy_np: Node pointer for the PHY
- * @flags: flags to pass to the PHY
- * @iface: PHY data interface type
- *
- * If successful, returns a pointer to the phy_device with the embedded
- * struct device refcount incremented by one, or NULL on failure. The
- * refcount must be dropped by calling phy_disconnect() or phy_detach().
- */
-struct phy_device *of_phy_attach(struct net_device *dev,
- struct device_node *phy_np, u32 flags,
- phy_interface_t iface)
-{
- struct phy_device *phy = of_phy_find_device(phy_np);
- int ret;
-
- if (!phy)
- return NULL;
-
- ret = phy_attach_direct(dev, phy, flags, iface);
-
- /* refcount is held by phy_attach_direct() on success */
- put_device(&phy->mdio.dev);
-
- return ret ? NULL : phy;
-}
-EXPORT_SYMBOL(of_phy_attach);
-
/*
* of_phy_is_fixed_link() and of_phy_register_fixed_link() must
* support two DT bindings: