Skip to content

Commit

Permalink
net: phy: provide stub for fixed_phy_set_link_update
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Aug 28, 2014
1 parent 2ba1b16 commit 464c366
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions include/linux/phy_fixed.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ extern int fixed_phy_register(unsigned int irq,
struct fixed_phy_status *status,
struct device_node *np);
extern void fixed_phy_del(int phy_addr);
extern int fixed_phy_set_link_update(struct phy_device *phydev,
int (*link_update)(struct net_device *,
struct fixed_phy_status *));
#else
static inline int fixed_phy_add(unsigned int irq, int phy_id,
struct fixed_phy_status *status)
Expand All @@ -34,14 +37,12 @@ static inline int fixed_phy_del(int phy_addr)
{
return -ENODEV;
}
#endif /* CONFIG_FIXED_PHY */

/*
* This function issued only by fixed_phy-aware drivers, no need
* protect it with #ifdef
*/
extern int fixed_phy_set_link_update(struct phy_device *phydev,
static inline int fixed_phy_set_link_update(struct phy_device *phydev,
int (*link_update)(struct net_device *,
struct fixed_phy_status *));
struct fixed_phy_status *))
{
return -ENODEV;
}
#endif /* CONFIG_FIXED_PHY */

#endif /* __PHY_FIXED_H */

0 comments on commit 464c366

Please sign in to comment.