Skip to content

Commit

Permalink
of_mdio: Enable fixed PHY support if driver is a module
Browse files Browse the repository at this point in the history
The fixed_phy driver doesn't have to be built-in, and it's
important that of_mdio supports it even if it's a module.

Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Jun 23, 2016
1 parent 8658aaf commit d1bd330
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/of/of_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ struct phy_device *of_phy_attach(struct net_device *dev,
}
EXPORT_SYMBOL(of_phy_attach);

#if defined(CONFIG_FIXED_PHY)
#if IS_ENABLED(CONFIG_FIXED_PHY)
/*
* of_phy_is_fixed_link() and of_phy_register_fixed_link() must
* support two DT bindings:
Expand Down
2 changes: 1 addition & 1 deletion include/linux/of_mdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static inline int of_mdio_parse_addr(struct device *dev,
}
#endif /* CONFIG_OF */

#if defined(CONFIG_OF) && defined(CONFIG_FIXED_PHY)
#if defined(CONFIG_OF) && IS_ENABLED(CONFIG_FIXED_PHY)
extern int of_phy_register_fixed_link(struct device_node *np);
extern bool of_phy_is_fixed_link(struct device_node *np);
#else
Expand Down

0 comments on commit d1bd330

Please sign in to comment.