Skip to contentSkip to conversation

of_mdio: Enable fixed PHY support if driver is a module

PATCH Applied Ben Hutchings 2 participants 2 messages Jun 21, 2016 – Jun 23, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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.

---

drivers/of/of_mdio.c +1 -1
@@ -274,7 +274,7 @@ struct phy_device *of_phy_attach(struct
 }
 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:
include/linux/of_mdio.h +1 -1
@@ -69,7 +69,7 @@ static inline int of_mdio_parse_addr(str
 }
 #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
Signature · 2 lines
Ben Hutchings
Software Developer, Codethink Ltd.