of_mdio: Enable fixed PHY support if driver is a module
authorBen Hutchings <ben.hutchings@codethink.co.uk>
Tue, 21 Jun 2016 00:17:17 +0000 (01:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Jun 2016 19:12:21 +0000 (15:12 -0400)
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>
drivers/of/of_mdio.c
include/linux/of_mdio.h

index e051e1b57609e45afa170f1d92cde38c7beefe5e..de68707a99c7718507f5dc0c8f628a00b3166e9c 100644 (file)
@@ -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:
index 8f2237eb348574cfeb56eb7af844be63e1e3184e..6c8cb9aa4c00751f4b0f3b588692b1bd3a7781a9 100644 (file)
@@ -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