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