of: mdio: remove of_phy_connect_fixed_link
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 22 May 2014 16:47:50 +0000 (09:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 May 2014 19:16:44 +0000 (15:16 -0400)
All in-tree drivers have been converted to use the new pair of
functions: of_is_fixed_phy_link() plus of_phy_register_fixed_link(), we
can now safely remove of_phy_connect_fixed_link.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/of/of_mdio.c
include/linux/of_mdio.h

index 1def0bb5cb37ab5d6c1e5f14fe0ab3eca055a93a..4c1e01ed16dc04f9d082e47b19a4cdeb2b9a9cbe 100644 (file)
@@ -245,44 +245,6 @@ struct phy_device *of_phy_connect(struct net_device *dev,
 }
 EXPORT_SYMBOL(of_phy_connect);
 
-/**
- * of_phy_connect_fixed_link - Parse fixed-link property and return a dummy phy
- * @dev: pointer to net_device claiming the phy
- * @hndlr: Link state callback for the network device
- * @iface: PHY data interface type
- *
- * This function is a temporary stop-gap and will be removed soon.  It is
- * only to support the fs_enet, ucc_geth and gianfar Ethernet drivers.  Do
- * not call this function from new drivers.
- */
-struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
-                                            void (*hndlr)(struct net_device *),
-                                            phy_interface_t iface)
-{
-       struct device_node *net_np;
-       char bus_id[MII_BUS_ID_SIZE + 3];
-       struct phy_device *phy;
-       const __be32 *phy_id;
-       int sz;
-
-       if (!dev->dev.parent)
-               return NULL;
-
-       net_np = dev->dev.parent->of_node;
-       if (!net_np)
-               return NULL;
-
-       phy_id = of_get_property(net_np, "fixed-link", &sz);
-       if (!phy_id || sz < sizeof(*phy_id))
-               return NULL;
-
-       sprintf(bus_id, PHY_ID_FMT, "fixed-0", be32_to_cpu(phy_id[0]));
-
-       phy = phy_connect(dev, bus_id, hndlr, iface);
-       return IS_ERR(phy) ? NULL : phy;
-}
-EXPORT_SYMBOL(of_phy_connect_fixed_link);
-
 /**
  * of_phy_attach - Attach to a PHY without starting the state machine
  * @dev: pointer to net_device claiming the phy
index 0aa367e316cb477b52deac7f7ec9278866e70734..d449018d07265200f4d8d6eeaf8ddac1a9010ebd 100644 (file)
@@ -22,9 +22,6 @@ extern struct phy_device *of_phy_connect(struct net_device *dev,
 struct phy_device *of_phy_attach(struct net_device *dev,
                                 struct device_node *phy_np, u32 flags,
                                 phy_interface_t iface);
-extern struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
-                                        void (*hndlr)(struct net_device *),
-                                        phy_interface_t iface);
 
 extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np);
 
@@ -59,13 +56,6 @@ static inline struct phy_device *of_phy_attach(struct net_device *dev,
        return NULL;
 }
 
-static inline struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
-                                                          void (*hndlr)(struct net_device *),
-                                                          phy_interface_t iface)
-{
-       return NULL;
-}
-
 static inline struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np)
 {
        return NULL;