Skip to content

Commit e6e14f6

Browse files
ffainellidavem330
authored andcommitted
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: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 5952fde commit e6e14f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/of_mdio.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <linux/phy.h>
1313
#include <linux/of.h>
1414

15-
#ifdef CONFIG_OF
15+
#if IS_ENABLED(CONFIG_OF_MDIO)
1616
extern int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np);
1717
extern struct phy_device *of_phy_find_device(struct device_node *phy_np);
1818
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);
3232
extern void of_phy_deregister_fixed_link(struct device_node *np);
3333
extern bool of_phy_is_fixed_link(struct device_node *np);
3434

35-
#else /* CONFIG_OF */
35+
#else /* CONFIG_OF_MDIO */
3636
static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
3737
{
3838
/*

0 commit comments

Comments
 (0)