From: Alexander Graf Date: Mon, 16 May 2016 18:52:42 +0000 (+0200) Subject: phy dp83867: Fix compilation with CONFIG_OF_MDIO=m X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=7f32541c2fdaa84af418c3e1431bbd066ab44d09;p=openwrt%2Fstaging%2Fblogic.git phy dp83867: Fix compilation with CONFIG_OF_MDIO=m 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 2afa61b51d41..94cc278b3136 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;