135-phy-fixed-phy-remove-fixed_phy_update_state.patch 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. From 9be436bdb67c1f4aa9f33f2477f94e1f58a0ff02 Mon Sep 17 00:00:00 2001
  2. From: Russell King <rmk+kernel@arm.linux.org.uk>
  3. Date: Fri, 2 Oct 2015 22:46:54 +0100
  4. Subject: [PATCH 723/744] phy: fixed-phy: remove fixed_phy_update_state()
  5. mvneta is the only user of fixed_phy_update_state(), which has been
  6. converted to use phylink instead. Remove fixed_phy_update_state().
  7. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
  8. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  9. ---
  10. drivers/net/phy/fixed_phy.c | 31 -------------------------------
  11. include/linux/phy_fixed.h | 9 ---------
  12. 2 files changed, 40 deletions(-)
  13. --- a/drivers/net/phy/fixed_phy.c
  14. +++ b/drivers/net/phy/fixed_phy.c
  15. @@ -115,37 +115,6 @@ int fixed_phy_set_link_update(struct phy
  16. }
  17. EXPORT_SYMBOL_GPL(fixed_phy_set_link_update);
  18. -int fixed_phy_update_state(struct phy_device *phydev,
  19. - const struct fixed_phy_status *status,
  20. - const struct fixed_phy_status *changed)
  21. -{
  22. - struct fixed_mdio_bus *fmb = &platform_fmb;
  23. - struct fixed_phy *fp;
  24. -
  25. - if (!phydev || phydev->bus != fmb->mii_bus)
  26. - return -EINVAL;
  27. -
  28. - list_for_each_entry(fp, &fmb->phys, node) {
  29. - if (fp->addr == phydev->addr) {
  30. - write_seqcount_begin(&fp->seqcount);
  31. -#define _UPD(x) if (changed->x) \
  32. - fp->status.x = status->x
  33. - _UPD(link);
  34. - _UPD(speed);
  35. - _UPD(duplex);
  36. - _UPD(pause);
  37. - _UPD(asym_pause);
  38. -#undef _UPD
  39. - fixed_phy_update(fp);
  40. - write_seqcount_end(&fp->seqcount);
  41. - return 0;
  42. - }
  43. - }
  44. -
  45. - return -ENOENT;
  46. -}
  47. -EXPORT_SYMBOL(fixed_phy_update_state);
  48. -
  49. int fixed_phy_add(unsigned int irq, int phy_addr,
  50. struct fixed_phy_status *status,
  51. int link_gpio)
  52. --- a/include/linux/phy_fixed.h
  53. +++ b/include/linux/phy_fixed.h
  54. @@ -23,9 +23,6 @@ extern void fixed_phy_del(int phy_addr);
  55. extern int fixed_phy_set_link_update(struct phy_device *phydev,
  56. int (*link_update)(struct net_device *,
  57. struct fixed_phy_status *));
  58. -extern int fixed_phy_update_state(struct phy_device *phydev,
  59. - const struct fixed_phy_status *status,
  60. - const struct fixed_phy_status *changed);
  61. #else
  62. static inline int fixed_phy_add(unsigned int irq, int phy_id,
  63. struct fixed_phy_status *status,
  64. @@ -50,12 +47,6 @@ static inline int fixed_phy_set_link_upd
  65. {
  66. return -ENODEV;
  67. }
  68. -static inline int fixed_phy_update_state(struct phy_device *phydev,
  69. - const struct fixed_phy_status *status,
  70. - const struct fixed_phy_status *changed)
  71. -{
  72. - return -ENODEV;
  73. -}
  74. #endif /* CONFIG_FIXED_PHY */
  75. #endif /* __PHY_FIXED_H */