netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] phy dp83867: Fix compilation with CONFIG_OF_MDIO=m
@ 2016-05-16 18:52 Alexander Graf
  2016-05-16 18:52 ` [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional Alexander Graf
  2016-05-17 18:22 ` [PATCH v2 1/2] phy dp83867: Fix compilation with CONFIG_OF_MDIO=m David Miller
  0 siblings, 2 replies; 12+ messages in thread
From: Alexander Graf @ 2016-05-16 18:52 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel, michal.simek, Dan Murphy, andrew

When CONFIG_OF_MDIO is configured as module, the #define for it really
is CONFIG_OF_MDIO_MODULE, not CONFIG_OF_MDIO. So if we are compiling it
as module, the dp83867 doesn't see that OF_MDIO was selected and doesn't
read the dt rgmii parameters.

The fix is simple: Use IS_ENABLED(). It checks for both - module as well
as compiled in code.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 drivers/net/phy/dp83867.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index 2afa61b..94cc278 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -99,7 +99,7 @@ static int dp83867_config_intr(struct phy_device *phydev)
 	return phy_write(phydev, MII_DP83867_MICR, micr_status);
 }
 
-#ifdef CONFIG_OF_MDIO
+#if IS_ENABLED(CONFIG_OF_MDIO)
 static int dp83867_of_init(struct phy_device *phydev)
 {
 	struct dp83867_private *dp83867 = phydev->priv;
-- 
1.8.5.6

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-05-17 20:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-16 18:52 [PATCH v2 1/2] phy dp83867: Fix compilation with CONFIG_OF_MDIO=m Alexander Graf
2016-05-16 18:52 ` [PATCH v2 2/2] phy dp83867: Make rgmii parameters optional Alexander Graf
2016-05-16 19:04   ` Florian Fainelli
2016-05-16 20:15   ` Andrew Lunn
2016-05-16 20:27   ` Dan Murphy
2016-05-17 18:22   ` David Miller
2016-05-17 18:34     ` Dan Murphy
2016-05-17 18:48       ` David Miller
2016-05-17 20:37         ` Alexander Graf
2016-05-17 20:40           ` Dan Murphy
2016-05-17 20:45             ` Alexander Graf
2016-05-17 18:22 ` [PATCH v2 1/2] phy dp83867: Fix compilation with CONFIG_OF_MDIO=m David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).