Commit e6e14f63 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

of_mdio: Correct check against CONFIG_OF

CONFIG_OF_MDIO is actually what triggers the build of drivers/of/of_mdio.c, so
providing inline stubs when CONFIG_OF_MDIO=y should be based on that symbol as
well.
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5952fde1
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <linux/phy.h> #include <linux/phy.h>
#include <linux/of.h> #include <linux/of.h>
#ifdef CONFIG_OF #if IS_ENABLED(CONFIG_OF_MDIO)
extern int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np); extern int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np);
extern struct phy_device *of_phy_find_device(struct device_node *phy_np); extern struct phy_device *of_phy_find_device(struct device_node *phy_np);
extern struct phy_device *of_phy_connect(struct net_device *dev, extern struct phy_device *of_phy_connect(struct net_device *dev,
...@@ -32,7 +32,7 @@ extern int of_phy_register_fixed_link(struct device_node *np); ...@@ -32,7 +32,7 @@ extern int of_phy_register_fixed_link(struct device_node *np);
extern void of_phy_deregister_fixed_link(struct device_node *np); extern void of_phy_deregister_fixed_link(struct device_node *np);
extern bool of_phy_is_fixed_link(struct device_node *np); extern bool of_phy_is_fixed_link(struct device_node *np);
#else /* CONFIG_OF */ #else /* CONFIG_OF_MDIO */
static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
{ {
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment