Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: phy: remove phy_attach

378e6523ebb1 ("net: bcmgenet: remove unused platform code") removed
the last user of phy_attach(). So remove this function.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/8812176a-e319-4e9f-815d-99ea339df8b2@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Heiner Kallweit and committed by
Jakub Kicinski
260d27b3 c698f5cc

-40
-38
drivers/net/phy/phy_device.c
··· 1896 1896 EXPORT_SYMBOL(phy_attach_direct); 1897 1897 1898 1898 /** 1899 - * phy_attach - attach a network device to a particular PHY device 1900 - * @dev: network device to attach 1901 - * @bus_id: Bus ID of PHY device to attach 1902 - * @interface: PHY device's interface 1903 - * 1904 - * Description: Same as phy_attach_direct() except that a PHY bus_id 1905 - * string is passed instead of a pointer to a struct phy_device. 1906 - */ 1907 - struct phy_device *phy_attach(struct net_device *dev, const char *bus_id, 1908 - phy_interface_t interface) 1909 - { 1910 - struct phy_device *phydev; 1911 - struct device *d; 1912 - int rc; 1913 - 1914 - if (!dev) 1915 - return ERR_PTR(-EINVAL); 1916 - 1917 - /* Search the list of PHY devices on the mdio bus for the 1918 - * PHY with the requested name 1919 - */ 1920 - d = bus_find_device_by_name(&mdio_bus_type, NULL, bus_id); 1921 - if (!d) { 1922 - pr_err("PHY %s not found\n", bus_id); 1923 - return ERR_PTR(-ENODEV); 1924 - } 1925 - phydev = to_phy_device(d); 1926 - 1927 - rc = phy_attach_direct(dev, phydev, phydev->dev_flags, interface); 1928 - put_device(d); 1929 - if (rc) 1930 - return ERR_PTR(rc); 1931 - 1932 - return phydev; 1933 - } 1934 - EXPORT_SYMBOL(phy_attach); 1935 - 1936 - /** 1937 1899 * phy_detach - detach a PHY device from its network device 1938 1900 * @phydev: target phy_device struct 1939 1901 *
-2
include/linux/phy.h
··· 2152 2152 int phy_resume(struct phy_device *phydev); 2153 2153 int __phy_resume(struct phy_device *phydev); 2154 2154 int phy_loopback(struct phy_device *phydev, bool enable, int speed); 2155 - struct phy_device *phy_attach(struct net_device *dev, const char *bus_id, 2156 - phy_interface_t interface); 2157 2155 struct phy_device *phy_find_next(struct mii_bus *bus, struct phy_device *pos); 2158 2156 int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, 2159 2157 u32 flags, phy_interface_t interface);