aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2014-08-27 20:04:48 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-28 01:59:39 -0400
commit464c3668f065baeacfffa9d421959d21069389fe (patch)
tree6df05a9f4a868fcf38cfb0abeccbf81dcf91a540
parent2ba1b163c9d5d716fb1061f3fb76832cc6eea37f (diff)
net: phy: provide stub for fixed_phy_set_link_update
In preparation for updating the DSA code and avoid using ifdefs there, provide an empty stub for fixed_phy_set_link_update when CONFIG_FIXED_PHY is not selected. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/phy_fixed.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/linux/phy_fixed.h b/include/linux/phy_fixed.h
index ae612acebb53..941138664c1d 100644
--- a/include/linux/phy_fixed.h
+++ b/include/linux/phy_fixed.h
@@ -18,6 +18,9 @@ extern int fixed_phy_register(unsigned int irq,
18 struct fixed_phy_status *status, 18 struct fixed_phy_status *status,
19 struct device_node *np); 19 struct device_node *np);
20extern void fixed_phy_del(int phy_addr); 20extern void fixed_phy_del(int phy_addr);
21extern int fixed_phy_set_link_update(struct phy_device *phydev,
22 int (*link_update)(struct net_device *,
23 struct fixed_phy_status *));
21#else 24#else
22static inline int fixed_phy_add(unsigned int irq, int phy_id, 25static inline int fixed_phy_add(unsigned int irq, int phy_id,
23 struct fixed_phy_status *status) 26 struct fixed_phy_status *status)
@@ -34,14 +37,12 @@ static inline int fixed_phy_del(int phy_addr)
34{ 37{
35 return -ENODEV; 38 return -ENODEV;
36} 39}
37#endif /* CONFIG_FIXED_PHY */ 40static inline int fixed_phy_set_link_update(struct phy_device *phydev,
38
39/*
40 * This function issued only by fixed_phy-aware drivers, no need
41 * protect it with #ifdef
42 */
43extern int fixed_phy_set_link_update(struct phy_device *phydev,
44 int (*link_update)(struct net_device *, 41 int (*link_update)(struct net_device *,
45 struct fixed_phy_status *)); 42 struct fixed_phy_status *))
43{
44 return -ENODEV;
45}
46#endif /* CONFIG_FIXED_PHY */
46 47
47#endif /* __PHY_FIXED_H */ 48#endif /* __PHY_FIXED_H */