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: fixed_phy: remove fixed_phy_register_with_gpiod

Since its introduction 6 yrs ago this functions has never had a user.
So remove it.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/ccbeef28-65ae-4e28-b1db-816c44338dee@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Heiner Kallweit and committed by
Jakub Kicinski
7b151e4e 9cd5ef0b

+7 -39
+7 -25
drivers/net/phy/fixed_phy.c
··· 223 223 } 224 224 #endif 225 225 226 - static struct phy_device *__fixed_phy_register(unsigned int irq, 227 - struct fixed_phy_status *status, 228 - struct device_node *np, 229 - struct gpio_desc *gpiod) 226 + struct phy_device *fixed_phy_register(unsigned int irq, 227 + struct fixed_phy_status *status, 228 + struct device_node *np) 230 229 { 231 230 struct fixed_mdio_bus *fmb = &platform_fmb; 231 + struct gpio_desc *gpiod; 232 232 struct phy_device *phy; 233 233 int phy_addr; 234 234 int ret; ··· 237 237 return ERR_PTR(-EPROBE_DEFER); 238 238 239 239 /* Check if we have a GPIO associated with this fixed phy */ 240 - if (!gpiod) { 241 - gpiod = fixed_phy_get_gpiod(np); 242 - if (IS_ERR(gpiod)) 243 - return ERR_CAST(gpiod); 244 - } 240 + gpiod = fixed_phy_get_gpiod(np); 241 + if (IS_ERR(gpiod)) 242 + return ERR_CAST(gpiod); 245 243 246 244 /* Get the next available PHY address, up to PHY_MAX_ADDR */ 247 245 phy_addr = ida_alloc_max(&phy_fixed_ida, PHY_MAX_ADDR - 1, GFP_KERNEL); ··· 304 306 305 307 return phy; 306 308 } 307 - 308 - struct phy_device *fixed_phy_register(unsigned int irq, 309 - struct fixed_phy_status *status, 310 - struct device_node *np) 311 - { 312 - return __fixed_phy_register(irq, status, np, NULL); 313 - } 314 309 EXPORT_SYMBOL_GPL(fixed_phy_register); 315 - 316 - struct phy_device * 317 - fixed_phy_register_with_gpiod(unsigned int irq, 318 - struct fixed_phy_status *status, 319 - struct gpio_desc *gpiod) 320 - { 321 - return __fixed_phy_register(irq, status, NULL, gpiod); 322 - } 323 - EXPORT_SYMBOL_GPL(fixed_phy_register_with_gpiod); 324 310 325 311 void fixed_phy_unregister(struct phy_device *phy) 326 312 {
-14
include/linux/phy_fixed.h
··· 13 13 }; 14 14 15 15 struct device_node; 16 - struct gpio_desc; 17 16 struct net_device; 18 17 19 18 #if IS_ENABLED(CONFIG_FIXED_PHY) ··· 22 23 extern struct phy_device *fixed_phy_register(unsigned int irq, 23 24 struct fixed_phy_status *status, 24 25 struct device_node *np); 25 - 26 - extern struct phy_device * 27 - fixed_phy_register_with_gpiod(unsigned int irq, 28 - struct fixed_phy_status *status, 29 - struct gpio_desc *gpiod); 30 26 31 27 extern void fixed_phy_unregister(struct phy_device *phydev); 32 28 extern int fixed_phy_set_link_update(struct phy_device *phydev, ··· 36 42 static inline struct phy_device *fixed_phy_register(unsigned int irq, 37 43 struct fixed_phy_status *status, 38 44 struct device_node *np) 39 - { 40 - return ERR_PTR(-ENODEV); 41 - } 42 - 43 - static inline struct phy_device * 44 - fixed_phy_register_with_gpiod(unsigned int irq, 45 - struct fixed_phy_status *status, 46 - struct gpio_desc *gpiod) 47 45 { 48 46 return ERR_PTR(-ENODEV); 49 47 }